imap: Added filtering of CAPABILITY and FETCH untagged responses

Only responses that contain "CAPABILITY" and "FETCH", respectively,
will be sent to their response handler.