newbench: factor out shared code in kvdb_database
newbench: factor out shared code in kvdb_database

nathanielherman/silo,nathanielherman/silo,stephentu/silo,nathanielherman/silo,stephentu/silo,stephentu/silo,nathanielherman/silo,stephentu/silo