Switching from dicts to regular objects in DB API

* Changing SqlAlchemy based DB layer
* Fixing all related unit tests

Change-Id: I9c910246e38b311605175f9954922919d604d62a