walletdb: Remove BerkeleyBatch friend class from BerkeleyDatabase
Summary:
This is a backport of core#19335 [5/5]
https://github.com/bitcoin/bitcoin/pull/19335/commits/74507ce71eb61105fb3ae8460999099234ca7b8b
Depends on D10037
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D10038