First part of API (w/ migration)

Summary:
- Migration to store message `blocks` in a separate table `parts`. This change is important for future use where non-message blocks can be uploaded to a namespace. The `part` objects are attachments on messages, and inherit from the `block` foundation, which provides the appropriate hashing, IDs, and Blob storage to S3 options.

- Custom JSON Encoder: works with many of our data objects (not all yet)

- API Documentation: these are written in Markdown and live in separate category files. The Flask app handles Markdown -> HTML rendering at the `/docs` URL. CSS based on GitHub style. Table of Contents is autogenerated based on filename ordering and title metadata.

- Initial version of the API server. (See the docs for more details) The Flask server `srv.py` runs on port 5555 and most of it is broken. It uses Flask Blueprints for different URL prefixes.

- File uploads: created in proper namespace

- File downloads: smart filenames are generated based on mimetype and common extensions (inline attachments don't have filenames)

- Fix for a *huge* bug parsing messages where we replaced newlines for all binary data (not just plain text)

Test Plan: all tests pass. updated test dump included

Reviewers: spang, emfree, kav-ya

Reviewed By: spang

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