dbtest: use postgresdsn
Created by: keegancsmith
This commit removes some duplicate code we had around updating a DSN based on PG envvars. The changes in behaviour are we now support reading the PGTZ envvar in postgresdsn and for dbtest we ignore an empty PGDATASOURCE (rather than only an unset one).
To achieve this we move from a hardcoded default DSN for dbtest to instead providing the equivalent defaults as PG envvars. To ensure we haven't regressed around the corner cases here we added a unit test for getDSN. It isn't exhaustive, instead we can now rely on the tests we have for postgresdsn.
Depends on https://github.com/sourcegraph/sourcegraph/pull/28833