[backport#17304 12/18] Refactor: Move MarkUnusedAddresses code out of CWallet::AddToWalletIfInvolvingMe
Summary:
This commit does not change behavior.
https://github.com/bitcoin/bitcoin/pull/17304/commits/46865ec958b6b9bde04a827de598975f14bdb5e7
Depends on D7158
Partial backport of Core PR17304
Test Plan:
ninja check
Reviewers: #bitcoin_abc, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D7159