walletdb: Introduce WalletDatabase abstract class
Summary:
Make WalletDatabase actually an abstract class and not just a typedef
for BerkeleyDatabase. Have BerkeleyDatabase inherit this class.
This is a backport of core#19334 [4/4]
https://github.com/bitcoin/bitcoin/pull/19334/commits/d416ae560e46a4846a3fd5990b7d390d2ef30ec8
Depends on D100234
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Differential Revision: https://reviews.bitcoinabc.org/D10025