Refactor p2p_add_connections
Summary:
This makes the code much easier to follow by avoiding a log of p2p_idx manipulations, and make it easier to changes the number of connections in the future without having to update the whole test.
Ref T1696.
Test Plan:
./test/functional/test_runner.py p2p_add_connections
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Maniphest Tasks: T1696
Differential Revision: https://reviews.bitcoinabc.org/D10972