Merge #12639: Reduce cs_main lock and avoid extra lookups of mapAddressBook in listunspent RPC
Summary:
Reduce cs_main lock in listunspent and refactor replacing three mapAddressBook lookups with one.
Backport of Core PR12639
https://github.com/bitcoin/bitcoin/pull/12639/
Test Plan:
../configure --enable-debug make check test_runner.py
Reviewers: deadalnix, Fabien, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc
Reviewed By: deadalnix, O1 Bitcoin ABC, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D4516