several fixes to imap: plain, custom port. also fixes to imap listfolders and getsize