Finished statistics tests using local db and setup

- finished base-class for db-tests that automatically create/destroy
database for each test-fixture, uses new connection/transaction for each
test
- implemented so that Statistics db-test use a fresh database and seed
just the data required to pass the tests