Initial checkin from private git repo

Initial checkin of proof-of-concept from local Git repo, with
all credentials stripped.
Initial SQLAlchemy implementation

Initial working checkin with the DB code from auth.py converted
to use SQLAlchemy's ORM stuff.  Kind of hacky support for the
Session() in auth.  Uses AuthenticationContext as a context
manager, but leaves a lot of stuff lying around at the module level.
Modify SQLAlchemy for use with Flask

The previous implementation did not work under Flask/WSGI because
of threading and SQLite.  Split the DB stuff into databases.py
and models.py, and make use of scoped_session() to fix that.
Concurrency is not a big problem since the DB is (for now)
read-only.