IMAP: rfc compliance fixes
IMAP: cleanup

fix a small leak, remove redundant warning