Implement pessimistic connection invalidation (MySQL only)

Check every connection that has been checked out from pool, and
invalidate it if it's stale.

This solves the `MySQL has gone away` issues.

See [SQLAlchemy Docs > Connection Pooling > Disconnect Handling - Pessimistic](http://docs.sqlalchemy.org/en/rel_0_7/core/pooling.html#disconnect-handling-pessimistic)

@phgross @deiferni