Refactor RPC: Access wallet through GetWalletForJSONRPCRequest
Summary:
Partially backport core's PR8775, namely:
RPC/Wallet: Pass CWallet as pointer to helper functions
RPC: Do all wallet access through new GetWalletForJSONRPCRequest
Test Plan:
make check ./test/functional/test_runner.py
Reviewers: schancel, #bitcoin_abc, jasonbcox
Reviewed By: schancel, #bitcoin_abc, jasonbcox
Subscribers: jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D925