[SCHEMA] Begin adding tag support to API.

Summary:
 * Rename InternalTag to UserTag, and add another table SystemTag for reserved,
   Inbox-managed tags that don't map to a backend folder (e.g., "sending",
   files")

 * Support folder name aliasing, so that we can handle Gmail's messy
   labels-aka-folders abstraction. I.e., treat "Sent" and "[Gmail]/Sent Mail"
   as the same folder.

 * Make the relationship between threads and tags many-to-many.

 * Add exposed_name and public_id fields to the Folder table to store the names
   we use when when exposing the folder as a tag.

 * Support tag as a query parameter in API queries. Current limitations:
   - Can only match on one tag at a time.
   - Can't match on public_id of user-created tag.

Test Plan: Ha! Not really. I did play with it a bit though.

Reviewers: spang, mg

Reviewed By: spang

CC: bengotow

Differential Revision: https://review.inboxapp.com/D148
Properly short-circuit out of InboxSession.add() when soft deletes disabled.

Otherwise this code will crash.
[SCHEMA] Correctly set public_id and exposed_name for existing 'Inbox' folders.

This commit does not actually alter the schema, but does include a migration.
The previous migration was not correctly setting the public_id and exposed_name
fields on existing Gmail 'Inbox' folders. This fixes that.
Put the latest migration where it belongs.
move these to other repo
Setup `/n/` API endpoint within the blueprint
Standardize Crispin types.

We now always coerce inputs to strings before passing them off to the
IMAPClient connection, and convert numbers to long ints before returning
them to the caller, so callers don't have to check types or coerce
themselves.

We are standardizing on *always* treating UIDs, X-GM-MSGID, and
X-GM-THRID as integers when just passing them around.
Don't make type coercions in db wrapper functions.

We should always be returning the straight-up types defined by the db columns.
[DEPENDENCIES] Add clear-cache tool.

Whenever we make an upgrade that e.g. changes the format, data types, or
other parts of cached data, we need to clear the existing cache on a
server restart. Here's a tool to do that.

I chose to use the click library for this tool because it's a really
nice interface for writing CLI scripts. We should use it more going
forward!
More log messages.
Fix bug where Gmail sync doesn't actually add imapuid entries sometimes.

SQLAlchemy was silently dropping the Folder filter condition because I
did not explicitly join() it on the query.
Replace BeautifulSoup with talon.

Faster and less memory intensive for our use case.
Lint inbox.util.html.
Bump requests dep to 2.3.0.

Lots of good fixes in this one.
errormsg in subject line
Validate query parameter input.

Check API query parameter values to make sure they make sense, and return 400
if they don't.
Fix Lens unit tests.

With the previous commit, a lens should *always* take a Unix timestamp for any
time-related parameters (previously, the expectations were implicitly and
erroneously different for API query filtering and webhook filtering).
remove commit_account. saving too lines isn't worth having another function
tx logging
Fix typo in join condition for contact search tokens.