Patch major memory leak due to GMime bindings

Discovered a few binding problems while working on another issue,
in particular gmime_parser_construct_message()'s return object
not being freed, which can hold an entire message (attachments and
all) in memory.
Better Message-ID parsing

While going through a database upgrade, I noticed (once again) debug
messages reporting bad Message-IDs in messages.  On closer inspection,
now see that our parser was tripping on Message-IDs with spaces inside
the brackets.  Need to allow this, so this new algorithm deals with
that.