use protocol and application level async methods

(instead of switch-case multiplexing)
move IMAP async methods into own class