imap: Standardised imapcode condition tests

For consistency changed two if(constant != imapcode) tests to be
if(imapcode != constant).