Pull out imap stuff into its own source file.  Add flags to allow
disabling imap.  Make the default for imap server/user/password to be
match the smtp versions of those.