imap: Corrected comment in imap_endofresp()
imap: Simplified command response test in imap_endofresp()
imap: Added stricter parsing of tagged command responses

Enhanced the parsing of tagged responses which must start with "OK",
"NO" or "BAD"