Send charset in IMAP search only if needed

Send charset in IMAP search only if needed for search option. For example, searching for recent messages does not need charset.

This is convinent when the application always sends strings in particular charset to different servers, some of  those will not support it.  This way we can ensure that IMAP will work for searchers that do not need sending strings