Add lots of features and testing to DB factory

Add several options to DB factory to allow: 1) auto schema loading, 2)
easy schema processing (by passing a function parameter at connect(), 3)
auto-loading of ActiveRecord and TableGateway modules with a simple path
option, and so on. Add tests for these.