Upgrade to SQLAlchemy 1.0.
Upgrade to SQLAlchemy 1.0.

Summary:
SQLAlchemy 1.0 promises a variety of performance and behavioral improvements,
as well as some appealing new features we might want to take advantage of -- in
particular, the "baked query" feature [1] as well as the Session.invalidate()
method, which might help resolve the mysterious ResourceClosedErrors we
occasionally see.

I reviewed the list of behavioral changes and didn't see anything that looked
problematic, except for a single case in Gmail uidinvalidity handling where we
do a potentially disallowed yield_per. But on testing this code path, it turns
out to be okay.

[1] http://docs.sqlalchemy.org/en/rel_1_0/changelog/migration_10.html#baked-queries

Test Plan: Run unit tests and test syncs. Let simmer on staging for a while.

Reviewers: spang

Reviewed By: spang

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

Eagles2F/sync-engine,ErinCall/sync-engine,closeio/nylas,wakermahmud/sync-engine,gale320/sync-engine,ErinCall/sync-engine,PriviPK/privipk-sync-engine,gale320/sync-engine,jobscore/sync-engine,PriviPK/privipk-sync-engine,Eagles2F/sync-engine,jobscore/sync-engine,closeio/nylas,PriviPK/privipk-sync-engine,nylas/sync-engine,nylas/sync-engine,wakermahmud/sync-engine,closeio/nylas,Eagles2F/sync-engine,jobscore/sync-engine,jobscore/sync-engine,Eagles2F/sync-engine,closeio/nylas,PriviPK/privipk-sync-engine,nylas/sync-engine,Eagles2F/sync-engine,wakermahmud/sync-engine,gale320/sync-engine,ErinCall/sync-engine,ErinCall/sync-engine,ErinCall/sync-engine,gale320/sync-engine,wakermahmud/sync-engine,gale320/sync-engine,PriviPK/privipk-sync-engine,wakermahmud/sync-engine,nylas/sync-engine