test: Fix out-of-range port collisions
Summary:
Otherwise the test will fail if two tests running in parallel use the same port.
Backport of core#25333 and core#25312.
Test Plan:
./test/functional/test_runner.py feature_proxy feature_bind_extra p2p_getaddr_caching
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D13810