unify data layer tests: was copied four times for all combinations of
cpu/gpu and leveldb/lmdb; now just one copy of each test body