Add STARTTLS support for both IMAP and SMTP using mozTCPSocket.upgradeToSecure().