Break ImapConnection#open into smaller methods