Bug 977867 - [email/IMAP] wait for server greeting before sending commands to workaround gmail issue. r=mcav

land https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/291