net: assert CNode::m_inbound_onion is inbound in ctor, add getter, unit tests
Summary:
test: fix constructing CNode with invalid inbound_onion
as CNode ctor should only be passed inbound_onion = true
when the connection is inbound
net: assert CNode::m_inbound_onion is inbound in ctor
and drop an unneeded check in CNode::ConnectedThroughNetwork()
net: add CNode::IsInboundOnion() public getter and unit tests
This is a backport of core#20210
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D10971