imapc: Use mail_search_arg_to_imap() to write IMAP SEARCH parameters. This also fixes a few bugs, since some of the search parameters weren't written entirely correctly.
imapc: Use mail_search_arg_to_imap() to write IMAP SEARCH parameters.
This also fixes a few bugs, since some of the search parameters weren't
written entirely correctly.

dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot