Feature/reduce imap traffic

This change greatly reduces the IMAP traffic for me when running searches and synchronizing folders. Any testing you can help with will be appreciated.