clean up IMAP state and selected mailbox on disconnect