test: Add tests for CNode::ConnectedThroughNetwork
Summary:
Note: I didn't backport the inline comments for argument names, because I don't think it is an improvement (my IDE already show the parameter names for literal parameters) and it will not help avoiding future merge conflicts (coding style incompatible with our linter and different signature for the CNode constructor)
This is a backport of core#19998 [3/3]
https://github.com/bitcoin/bitcoin/pull/19998/commits/3984b78cd7f49e409377f2175a56e8e4bd71d1d8
Depends on D10457
Test Plan: ninja check
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Subscribers: majcosta
Differential Revision: https://reviews.bitcoinabc.org/D10458