Use object returned from add_p2p_connection to refer to
p2ps. Add a test class attribute if it needs to be used across
many methods. Don't use the p2p property.
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/19804 | core#19804]] [1a/4]
https://github.com/bitcoin/bitcoin/pull/19804/commits/549d30faf04612d9589c81edf9770c99e3221885
`abc*` test will be done separately.