imap: Tidied up the final FETCH response function

Removed unnecessary state change on failure and setting of result code on
success.