remove stunnel config from api server
Support query parameters on /threads and /messages API queries.

Summary:
Example:
http://localhost:555/<ns_public_id>/messages?
from=christine@spang.cc&last_message_after=1398384000

Right now we're only doing exact matching on string parameters.

Relatedly:
* Fix a typo in APIEncoder (subjectdate belongs to Thread not
Message).
* Order query results by ascending ID so that windowing can work properly.

Test Plan: Experimental feature.

Reviewers: mg

Reviewed By: mg

Differential Revision: https://review.inboxapp.com/D131
Format display name/email pairs in JSON as dicts, not arrays.

Summary:
Not sure if this is what we actually want to go with for the API, but if so
here's an expedient way to do it.

Responses now look like this:

"cc": [
    {
        "email": "daniel.l.gerber@gmail.com",
        "name": "Daniel Gerber"
    },
    {
        "email": "narenst@gmail.com",
        "name": "Naren"
    },
    {
        "email": "townley.andrew@gmail.com",
        "name": "Andrew Townley"
    }
],

Instead of this:
"cc": [
    [
        "Daniel Gerber",
        "daniel.l.gerber@gmail.com"
    ],
    [
        "Naren",
        "narenst@gmail.com"
    ],
    [
        "Andrew Townley",
        "townley.andrew@gmail.com"
    ]
],

Test Plan: Manual testing

Reviewers: mg

Reviewed By: mg

CC: bengotow

Differential Revision: https://review.inboxapp.com/D132
Actually pass thread id parameter to query filter.
put api server behind gevent.wsgi
Actually return participants for a thread.

Currently we're deduplicating only on the (display name, email) pair, so a
given thread may contain e.g. both

{ "email": "pika-private@mit.edu",
  "name": "\"pika-private@mit.edu\"\t" }

and

{ "email": "pika-private@mit.edu",
  "name": "Wrathful Artichokes" },

as separate participants, but this is better than nothing for now.
[SCHEMA] Webhook service, special preview version.

Summary:
Please see the module docstring in inbox/server/transactions/webhook.py for a
discussion of the overall service design.

Test Plan: Working on it.

Reviewers: spang, mg

Reviewed By: mg

Differential Revision: https://review.inboxapp.com/D130
[SCHEMA] Save more folder names.

Need these since we've fleshed out the API for remote folders.
[SCHEMA] Separate tables for backend folders/labels and Inbox-internal Tags.

Following a design discussion, we are splitting our notion of folders
and tags into two different things: folders/labels from the account
backend (e.g. Gmail), and Inbox-specific tags.
Port Gmail code to new folder/label schema.

With this change, we rip out folder name translation for Gmail labels
and store them as-is. Special Inbox labels will be provided via
different queries; they no longer are stored specially in the database.
Split actions into local/remote, subsuming old API functions.

Since we are now mirroring folders/labels from remote accounts to our
local data store as-is, we no longer have a unified API for what e.g.
'local archive' means for any given message. We solve this by expanding
the actions API to also cover local actions.