imap: Improved FETCH response parsing

Added safer parsing of the untagged FETCH response line and the size of
continuation data.
imap: Updated setting of transfer variables in imap_state_fetch_resp()

Add number of bytes retrieved from the PP cache to req.bytecount and set
req.maxdownload only when starting a proper download.