Also catch ValueError in message parsing.

Summary: This will let us diagnose T612.

Test Plan: None.

Reviewers: khamidou

Differential Revision: https://review.inboxapp.com/D751
Remove RETRY_FAIL_CLASSES in mailsync.

For better or for worse, we really have to keep retrying on things like
transient IntegrityErrors due to race condition, or strange errors raised in
message parsing.
Add support for excluding object types from delta sync API.

Summary:
This allows clients who don't care about, say, calendar events to limit
the changeset they get from the /delta and /delta/streaming endpoints, for
better performance.

Test Plan: Unit tests updated.

Reviewers: khamidou

Subscribers: bengotow

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

Conflicts:
	inbox/api/ns_api.py
Don't strip quoted text.

Summary:
Too unreliable for our use case without significant changes to Talon's
internals.

Test Plan: Run message-parsing unit tests.

Reviewers: spang, mg

Reviewed By: mg

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

Conflicts:
	inbox/models/message.py
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

Conflicts:
	inbox/mailsync/backends/imap/generic.py