[telegram-desktop] Backported upstream patches with startup hangs fixes.