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.