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