[net/refactor] Introduce an enum to distinguish type of connection
Summary:
- extract inbound & outbound types
Partial backport (2/19) of core PR19316:
https://github.com/bitcoin/bitcoin/pull/19316/commits/26304b4100201754fb32440bec3e3b78cd3f0e6d
Depends on D8711.
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Differential Revision: https://reviews.bitcoinabc.org/D8712