Consolidate to a single database object

Not ready for production, but it is ready for review and comment.  I'd like to run a few more tests against a Rails 4 & 4.1 app before this is merged.

What I've done here is consolidate all of the database operations (that I could see) into a single "database" object.  I believe this is the first step towards support more databases, as this database object could be replaced with one hooked to ActiveRecord, or MongoDB, or whatever, and the rest of the system would adjust.  

Also, by isolating the database operations, making changes like a different configuration per environment becomes trivial.