imap: fix handling of FETCH responses

We do not split the responses for each [msg_att] (so that we can make
out which msg_att's go together - for example, to associate with UIDs).
Add License
imap: close i/o channels on disconnect