walletdb: Ensure that having no database handle is a failure
Summary:
Previously having no database handle could still be considered a success
when BerkeleyDatabase and BerkeleyBatch were used for dummy database
things. With dedicated DummyDatabase and DummyBatch classes now, these
should fail.
This is a backport of core#19102 [3/3]
https://github.com/bitcoin/bitcoin/pull/19102/commits/0fcff547d5b47822c13104978fda0c486e596526
Depends on D10049
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Differential Revision: https://reviews.bitcoinabc.org/D10050