This fixes the case where transaction notifications arrive between getWalletTxs and subscribeToCoreSignals. Basically notifications are queued until getWalletTxs and wallet rescan complete.
This is also a requirement to call getWalletTxs in a background thread.
Motivated by https://github.com/bitcoin/bitcoin/issues/20241.