Implement a "raw" message endpoint

Summary: This patch adds a new endpoint: "/messages/<id>/rfc2822" which returns the raw message.

Test Plan: Ran the code.

Reviewers: emfree

Reviewed By: emfree

Projects: #sync-engine

Differential Revision: https://review.inboxapp.com/D640
fix migration branch
Remove unused code.
Fix OutlookAuthHandler.create_account() arguments.
Add super simple streaming API endpoint.

Summary:
This commit adds support for a long-polling API changes endpoint at
/n/<namespace_id>/delta/streaming. Soon we can directly stream the same updates
as the old delta sync endpoint, but for the moment we just send a really basic
ping when there are changes detected.

Test Plan: Unit tests added.

Reviewers: bengotow, kav-ya

Reviewed By: kav-ya

Subscribers: spang

Differential Revision: https://review.inboxapp.com/D647
Store labels in ImapUid

Summary:
This is a minimal patch to store label information per-folder. Note that this is only about storing data, not updating thread info using it.

I'd like you to take a look at the MutableList class I've added -- this SQLAlchemy thing is black magic.

There's one big question though: how do we update this info in prod? I was thinking we could have a one-off program that would go through every message of every account and query label information but this sounds super complicated to get right.

Test Plan: Ran a sync.

Reviewers: kav-ya, emfree

Reviewed By: emfree

Projects: #sync-engine

Differential Revision: https://review.inboxapp.com/D617
Create canonical tag objects at Namespace creation time.

Summary:
We assume that tags like 'sent' and 'drafts'are always available, for example
in the drafts/sending API functionality, but we previously only ensured
that they existed when we started a sync. This only caused problems.

Instead, just create the tag objects when a new Namespace is initialized.

Test Plan: Run unit tests; auth and sync an account.

Reviewers: kav-ya

Reviewed By: kav-ya

Differential Revision: https://review.inboxapp.com/D659
Fix index creation script + search adapter to actually create indexes.
Update script to take namespace_public_id as reqd. arg.
Basic Gmail search test script.
Basic DSL query constructor for match, match_phrase, simple + boosted multi-match.
Query passed in JSON request body rather than query string.

Basic tests for #indexes, index_mappings.
And, (or) as bool queries.
Include scores in process_results().

TODO:
1. Tests
2. Docs

Also,
- Or query.
- Look into elasticsearch python dsl library.
Basic message search tests.
Fix mapping issues.
Fix multi-match query.

More message tests.
Basic thread tests.
Basic search docs.
Fix docs formatting.
Messages, thread parent
Parent-child mapping for Message, Thread.
Child queries too.