Refactor DbHelper::truncateAllTables() to truncate non-core tables, and tweaks to DatabaseTestCase tests.