Migrate database API tests to resource_* fixtures

Partially-implements bp resource-cleanup

Change-Id: Iadb0a985e9ea3567c276a4659948037d39d7b845
Merge "Migrate database API tests to resource_* fixtures"