[net/refactor] Add connection type as a member var to CNode
Summary:
- Directly maintaining the connection type prevents having to deduce it from several flags.
Partial backport (9/19) of core PR19316:
https://github.com/bitcoin/bitcoin/pull/19316/commits/d3698b5ee309cf0f0cdfb286d6b30a256d7deae5
Depends on D8718.
Test Plan:
ninja all check
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D8719