```
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.