In preparation for actually creating a Xapian index from the message, (not that we're doing that quite yet).
This will (when it is finished) make a much more reliable way to ensure that notmuch's sync program behaves identically to sup-sync. It doesn't actually do anything yet.
Basically just playing with some simple code using libgmime to parse an email message.