add base class to DB tests
tests: obviate on-disk test library
merge disk and memory query tests
test_query: use base test classes