Factored out some common code between the TestDb and the TestWebApi test...

... classes, in particular the `setup` and `tearDown` functions were almost identical. Previously the `TestWebApi` did not initialise the database in its `setup` function, but now it does (because it just inherits it from `TestWithDatabase`. If this is problem we could easily take the `Db.init(this.databaseFile)` out of `TestWithDatabase.setup` and override that function within `TestDb`.

An alternative to having `TestWithDatabase` functions `setup` and `tearDown` both calling a separate function (`deletePhysicalDatabase`) is that `setup` simply calls `tearDown`. The reason I have not done this is that in the future it seems mildly likely that one might add stuff to `tearDown` that we do not want done at the start of `setup`.