Some components are constructed prior to opening the database and must
outlive the database. These can also be shared between database instances
though at the time of this comment we only open one database per process.
These assets are housed in the shared Context.
For unit and integration tests; removes the database directory when called.
To prevent misuse, cfg!(test) must be true for a unit test or the
integration test server is named localhost.