[SCHEMA] Drop part.misc_keyval column.

We have no plans to use this data, and a lack of logic for truncation is
causing some messages to break syncs.

Fixes T177.
Don't retry on DataError and IntegrityError.
[SCHEMA] Make Message.*_addr non-null to prevent TypeErrors.

In Thread.participants, we assume that these attributes are iterable, but they
may not be set at all in case of decoding error. It's generally safer to have
them maybe be the empty list, but never null.

Fixes T181.
Fix previous migration down_revision ID.
Make slow query logging more structured.

Also add support for log.exception, which may be called by gunicorn.
Fix bug in migration 064.
Fix sending error when subject parameter is unset.

If we're sending a reply to a thread and there's no subject given, use the
thread's subject; otherwise use the empty string. Fixes TypeError in gmail
sending code.
Fix bug in g_msgids() affecting Gmail message deduplication.

We occasionally were failing to deduplicate message object creation or
download because we wrongly excluded messages which currently had no
associated ImapUids. (This is actually a common situation, as when a
message moves we might well delete the old ImapUid before creating the
new one.)

Fixes T180.
Remove unused import in inbox/crispin.py.
More safely format large exception messages.

The immediate reason for this is that SQLAlchemy may return an excessively
large error message if, say the MySQL server goes away because you're trying to
insert a large object. Trying to log the entire 25MB insert statement is not
that helpful, and breaks various things.
Log to stdout, not stderr.

This lets us separate our own logs from other stuff, like boto logs and
un-truncated tracebacks.
Implement a safer_yield_per utility to avoid OOM issues and slowness.
Add an index to the transaction table to speed up client sync.
Fix index name collision in migration 056.
[auth] Add the NotSupportedError exception.
Basic multicore support for SyncService.

We implement super ultra basic multicore support by splitting account
syncs across CPU by (account.id % 4), which does not take into account
system load in any way whatsoever. We can still shard across machines by
changing the recorded hostname.

gipc is required in order to prevent multiprocessing from duplicating
parent greenlets into child processes.

My goal here was to retain deployment+development simplicity, hence
choosing to use Python's multiprocessing library rather than a shell
script wrapper or CLI arguments + multiple supervised services. Despite
some (expected) hurdles, seems to be working out.

In the meantime, we also removed SyncService's dependency on ZeroRPC,
and instead do all account actions by polling for changes to the
database. bin/inbox-sync now simply marks the database and returns
immediately instead of waiting on an RPC call. Nothing should be talking
directly to the mail sync process now.