Properly open and close leveldb dbs

They were being created per group, not per test, then caused errors 
referencing the group db when trying to iterate. Closing helped at first,
but they should each use a new DB