moved all SQL queries into single Database module

In CycleDash, I've spent quite a bit of time making otherwise simple things things work in SQLAlchemy. E.g. `CREATE TEMP TABLE` vs. the SQLAlchemy equivalent. So this wasn't a vote for or against it, for what it's worth.