Move database cleanup to the setUp()/tearDown() methods.
Move database cleanup to the setUp()/tearDown() methods.

Requires changing some helper functions to methods, the real change
is 4 line long.


Former-commit-id: 57bc412dd794b6d1530eeb658d076d63991f3ad6 [formerly 3580f33a4f2f8777ad58d00ad36d5dce03d9555b] [formerly 3580f33a4f2f8777ad58d00ad36d5dce03d9555b [formerly fdc9be6efdb1c4ad06e05bc0e9d1fe54ef566447]]
Former-commit-id: b30963683d99fd3481d0542215d399df1ccfee24
Former-commit-id: a83fb7a07c7dfe3e289f4d730e5eb5f3242c1665
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine