Create test DB if 'database' GET param is set, but no matching DB is found
Set temp database on current request

Was relying on cookie to set on NEXT request, which was too late
since some of the following init logic relied on DB queries.
This happened to work if your non-test DB was already set up,
but failed on fresh checkouts.