Unbreak drafts from previous fix.
Limit number of threads and messages that can be requested.

Remove support and documentation for 'set limit=0 for no limit' behavior. This
will just break things if you try to request *all* messages in a mailbox. For
now, don't allow limit arguments greate than 1000.
Assorted minor documentation updates.

* Update example response bodies to be mostly valid JSON.
* Replace most real people's email addresses with fake ones.
* Clarify a few things.
* Fix typos.
Fix ./runtests so the command-line options work as expected i.e.
./runtests runs provider-agnostic tests only (tests/general, tests/imap)
./runtests -i runs IMAP-specific tests only (tests/imap but not the network tests)
./runtests -a runs all tests.

Also update tests in tests/imap/network.
Only select All Mail folder in console if it exists.

Users can configure which folders are available over IMAP, so sometimes a Gmail account will not have a detected All Mail folder. We shouldn't try to select the folder in that case, so the console can still be used for debugging.
Fix typo in message API.
Update README.md
Fix typos in docs.
Properly set snippet and subject/subjectdate on threads.
Fail more informatively if the inbox package isn't installed.
retry_with_logging(), retry_and_report_killed() take optional retry_classes + fail_classes arguments;
it doesn't make sense for retry() to do so otherwise.

Summary: As above.

Test Plan: Test added in tests/general/test_logging.py

Reviewers: emfree

Differential Revision: https://review.inboxapp.com/D225
Support for inbox.util.eas in the /inbox-eas repo; this is where EAS-specific util code would live.

Summary: As above.

Test Plan: Sync runs as before.

Reviewers: spang

Differential Revision: https://review.inboxapp.com/D226
Fixes T120: resume 'killed' syncs on restart. Also consolidates account sync_state updates.

Summary: As above.

Test Plan: Killed, stopped syncs + restarted server.

Reviewers: emfree

Differential Revision: https://review.inboxapp.com/D227
Log auth errors.
arc land onto branch 'dev' by default.

Note that you can also do `arc land --onto <branch>`.
Actually configure arcanist correctly.
Use a gevent pool for actions syncback instead of Redis-plus-workers.

Summary:
This is much simpler, and we were probably going to change this eventually
anyways. The immediate reason for doing it right now is that the rq module
reconfigures the root logger, which is really annoying when you are trying to
actually configure it yourself.

Also, start the SyncbackService as a simple greenlet instead of a ZeroRPC
service (which it isn't really).

Test Plan: Unit tests updated, end-to-end syncback behavior manually verified.

Reviewers: spang

Reviewed By: spang

Differential Revision: https://review.inboxapp.com/D229
[inbox/vault] Move refresh token storage to a local vault.

Summary: Moves the storage of refresh_tokens to use the prototype vault API.

Test Plan: Run regression

Reviewers: emfree

Reviewed By: emfree

Maniphest Tasks: T117

Differential Revision: https://review.inboxapp.com/D228
Fix default limit for API resource requests.
Deduplicate a thread's participants by email address.