Make BerkeleyBatch::Recover and WalletBatch::RecoverKeysOnlyFilter standalone
Summary:
Instead of having these be class static functions, just make them be standalone. Also removes WalletBatch::Recover which just passed through to BerkeleyBatch::Recover.
Partial backport (8/11) of core PR18918:
https://github.com/bitcoin/bitcoin/pull/18918/commits/b426c7764d26e280e1f814cf36e050743c45cd12
Depends on D8594.
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Differential Revision: https://reviews.bitcoinabc.org/D8595