test: Extend functional tests for addr relay
Summary:
This extends the functional test p2p_addr_relay.py. It adds test coverage for address relay involving outbound peers, tests for both outgoing and incoming GETADDR requests and tests for -blocksonly mode.
Backport of core#21707, core#21785 (fix intermittent failure in the test) and core#22306 (improvements to p2p_addr_relay.py, also fixes an intermittent issue).
Note to reviewers: you can look at the file after #22306 to get the final version of the test.
Depends on D10860.
Ref T1696.
Test Plan:
ninja check-functional
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Subscribers: PiRK
Maniphest Tasks: T1696
Differential Revision: https://reviews.bitcoinabc.org/D10861