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 core#19804 [1a/4]
https://github.com/bitcoin/bitcoin/pull/19804/commits/784f757994c1306bb6584b14c0c78617d6248432
abc* test will be done separately.