[backport#16898] test: Use connect_nodes when connecting nodes in the test_framework
Summary:
https://github.com/bitcoin/bitcoin/pull/16898/commits/faaee1e39a91b3f603881655d3980c29af09852b
Partial backport of Core PR16898
Test Plan:
ninja check-all
Reviewers: #bitcoin_abc, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Subscribers: jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D6490