Migrate models to SQLAlchemy

The following models have been migrated to SQLAlchemy:

* User
* Query
* QueryRevision
* QueryRun

This also removes the Redis caching of the SQL results.
We will add those back in the future when we start hitting
performance problems.

Change-Id: If7b49acd741fe994616bcaa599ce60cb0af76f4b