Add testsuite for adapters directly relying on external modules

Testing the database wrappers is tricky, one approach is to write a set
of contract tests for the free monads they are supposed to be implementing,
then run the contract tests against each wrapper.

* In-Memory store is ran as a State monad
* LevelDB store is run against the filesystem in a temp dir