Fix IMAP UIDVALIDITY for Gmail.

Summary:
This commit implements the resync_uids_from in GmailFolderSyncEngine.
Gmail makes our life easier here, we exploit the availability of
X-GM-MSGIDs to update the messages with their new UIDs and the folder
with the new UIDVALIDITY.

Close T601.

Test Plan:
Bring up a virtual machine, restore this
https://inboxapp.slack.com/files/emfree/F02V5ALCJ/bad_uidvalidity_dump.sql
database dump, run bin/inbox-start, and make sure the 'uidinvalid' folder gets
fixed.

Reviewers: spang, emfree

Subscribers: khamidou

Maniphest Tasks: T601

Differential Revision: https://review.inboxapp.com/D736