imap: Introduced the SEARCH state
imap: Added support for parsing URL query strings

Added support for parsing query strings from the URL as defined by
RFC-5092.