Update ImapUid code now that we generate Messages regardless of parse errors.
X-GM-MSGID is unique per account, but not globally.

We had a couple bugs in there where we were making improper assumptions
on how to look up the associated Message object when creating ImapUid
entries for deduplicated Gmail message downloads.