Fix a IMAP fetch hang

So apparently sometimes (this is the first time it's happened) Google
will give me a message that looks like

  FETCH (...
  BODY
  BODY)

as opposed to

  FETCH (...
  BODY
  BODY
  )

like it usually does.  This used to cause me IMAP fetch handler to
barf, but I've gone ahead and added a special case for it right now.
Hopefully I didn't break anything...
Actually fix that IMAP bug

So it turns out that while I no longer locked up while trying to read
stuff from the IMAP server, I ended up adding some extra worthless
bits to the end of a file.

This fixes my oversight.
Implement "mhng-detach", which writes attachments

The general idea here is that "mhng-mime" prints out text attachments,
while "mhng-detach" prints out binary attachments.  This might not be
strictly necessary, but I think it's good -- at least I want to make
sure to preserve newlines in binary attachments.