Get rid of bad usage of MediaWikiTestCase in the Wikibase\Database component

Change-Id: If801e2629b6b0ebf54c66634084d736e2c10a49c
Merge "Get rid of bad usage of MediaWikiTestCase in the Wikibase\Database component"