[build-bot] Fix database test when an extension is not present on the database file
Summary:
In some versions of Python, a different database backend may be selected.
The backend selected may or may not append an extension to the database file.
This patch fixes the implementation and test to work whether a file extension is present
or not. It also moves the test database to a more predictable location and does not
clean it up after the test is run to allow for easier post-test debugging.
Test Plan:
Running `pytest` in either `contrib/buildbot` or `contrib/buildbot/test` produces `contrib/buildbot/test/test_output/database`(with optional `.db` extension). Running `pytest` repeatedly, the tests still pass.
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D8060