Safer data migrations

Specifically, let sqlalchemy handle type casting, escaping special
chars, etc.

Change-Id: I6ffed964b0dc6e140002664675423b83fdeee166
Auto-detect max SQL migration

Change-Id: I56b1d6ded61ad430929d0275ab384ff464faa53c
Merge "Safer data migrations"
Merge "Auto-detect max SQL migration"
downgrade user and tenant
normalized tables downgraded such that sqlite is supported, too

Change-Id: I93ed4589cbe7fd3aee16e42489c322ae903bdac7
Merge "downgrade user and tenant normalized tables downgraded such that sqlite is supported, too"