Store messages using Google's unique message ID so it's stable across mailboxes.
Fix the date storage format to use 24 hour time.