Add calls to CWallet::BlockUntilSyncedToCurrentChain() in RPCs
Summary:
This prevents the wallet-RPCs-return-stale-info issue from being
re-introduced when new-block callbacks no longer happen in the
block-connection cs_main lock
This is extracted from Core's PR10286 commit 5d67a7868db188f7e43ce9028f215034d057790d
Depends on D2267
Test Plan:
make check ./test/functional/test_runner.py
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien, teamcity, schancel
Differential Revision: https://reviews.bitcoinabc.org/D2268