Proper initialization to avoid build warnings.
Copy test database into the build tree.
Fix statedb tests.