Refactored DatabaseBackend class into object oriented view of database.

* The DatabaseBackend class was too simple to model the database and its
  transformations. This new object oriented view of the database can be
  used to create DDL queries based on the context of the database
  structure.
* Added various tests to verify that all transformations work as intended.