Use a more performant IMAP command for CONDSTORE queries.

Summary:
Doing a search by MODSEQ is deadly slow on Gmail, but doing
FETCH 1:* (...) (CHANGEDSINCE <modseq>) is pretty fast, particularly for modseq
values close to the highest modseq.

Note that this commit changes the semantics of
CrispinClient.new_and_updated_uids(modseq): previously, this would return UIDs
with MODSEQ >= modseq. Now it returns UIDs with MODSEQ > modseq. But this is
also what we actually want whenever we call it.

Test Plan:
Run both the old and new IMAP commands for a bunch of
randomly-chosen modseq values, and check that they return consistent results.

Reviewers: spang

Reviewed By: spang

Differential Revision: https://review.inboxapp.com/D625
Implement fallback DNS query for NoAnswer; add postini MX servers.

Test Plan: Regression tests added.

Reviewers: charles

Reviewed By: charles

Differential Revision: https://review.inboxapp.com/D626
[imap] Update logging to look like other logs.
[build] Add Dockerfile.
Fix variable definition.
Remove extraneous diff.
Add godaddy to providers file.

Summary: Stopgap for now until we support custom IMAP settings.

Test Plan: None, don't have test account :(

Reviewers: charles

Reviewed By: charles

Differential Revision: https://review.inboxapp.com/D628
[docker] Set user when running docker.
Fix args in save_draft().
[docker] Move to using a base image to avoid blowing away caches of modular builds (inbox -> inbox-eas -> redwood).
[docker] Create the admin user in the inbox-base image.
Add providers-as-json script

Test Plan: Run the test

Reviewers: kav-ya

Reviewed By: kav-ya

Differential Revision: https://review.inboxapp.com/D621
[SCHEMA] Properly cascade folder deletions to imap bookkeeping.

Summary:
If we sync a folder deletion from the remote, we have to cascade it to
ImapFolderInfo and ImapFolderSyncStatus rows, or we get
```
IntegrityError: (IntegrityError) (1048, u"Column 'folder_id' cannot be null")
'UPDATE imapfoldersyncstatus SET updated_at=%s, folder_id=%s WHERE
imapfoldersyncstatus.id = %s' (datetime.datetime(2014, 10, 20, 19, 22, 47,
851225), None, 1524)
```

Note that we already do precisely this cascade for ImapUids.

Test Plan: Regression test added.

Reviewers: kav-ya

Reviewed By: kav-ya

Differential Revision: https://review.inboxapp.com/D633
Handle threads spanning multiple folders in generic actions

Summary:
This is a diff that fixes T501 and T549. It's only a proof of concept on the generic actions. Here's some of the changes:
- refactor the generic actions to remove `syncback_action`. The whole higher-order stuff was used only because we wanted to retry actions and it didn't mesh well with executing the same action on multiple folders. Also note that the code doesn't care about retrying things on IMAP failures because (in theory) the syncback service handles this for us.
- I made some cleanups to the syncback code and I bundled some fixes to the tests (sorry but this branch originally started as test fixes).

Test Plan: Ran the actions on a fastmail account.

Reviewers: kav-ya, emfree

Reviewed By: emfree

Projects: #sync-engine

Maniphest Tasks: T501

Differential Revision: https://review.inboxapp.com/D622
WIP
move to mutablelist
address review comments + added a script to update old imapuids
updated db dump
address review comments
make update script work