Refactored dbm tests.

Doing a general refactoring to do continued development on dbm.  Separated the tests out to reflect the different layers, and removed some duplicate code.
Added unittest library as testing framework.
Added staticmethods to each class of tests to reflect the layer-specific checks.