Reverted to a working state

It seems that SQLAlchemy's Automap extension is currently very
unstable. No longer making use of many-to-many relationship
detection. Moved to unstable code to a separate module `db2`.