[core#19724 7/9][refactor] Simplify connection type logic in ThreadOpenConnections
[core#19724 7/9][refactor] Simplify connection type logic in ThreadOpenConnections

Summary:
Consolidate the logic to determine connection type into one conditional to
clarify how they are chosen.

This is a backport of [[https://github.com/bitcoin/bitcoin/pull/19724 | core#19724]] [7/9]
https://github.com/bitcoin/bitcoin/pull/19724/commits/4829b6fcc6489b445f80689af6c2a1a919f176b1

Depends on D9775

Test Plan: `ninja all check-all`

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D9776

Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc