Support secure connections, tested with Fastmail.fm's mail.messagingengine.com
Issue UID THREAD command earlier, so that we don't waste time with Gmail IMAPD