Ports models to SQLAlchemy style

We were working on a project to replace Drupal with something more
Pythoney, but not as big as Django.  This is just a first pass at
getting the Drupal database to play nice with SQLAlchemy.