[core#19724 3/9][refactor] Restructure logic to check for addr relay.
Summary:
We previously identified if we relay addresses to the connection by checking
for the existence of the m_addr_known data structure. With this commit, we
answer this question based on the connection type.
IsAddrRelayPeer() checked for the existence of the m_addr_known
This is a backport of core#19724 [3/9]
https://github.com/bitcoin/bitcoin/pull/19724/commits/dff16b184b1428a068d144e5e4dde7595b4729c0
Depends on D9771
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Subscribers: majcosta
Differential Revision: https://reviews.bitcoinabc.org/D9772