[net] Consolidate logic around calling CAddrMan::Connected()
Summary:
Currently, the logic around whether we called CAddrMan::Connected() for
a peer is spread between verack processing (where we discard inbound
peers) and FinalizeNode (where we discard misbehaving and
block-relay-only peers). Consolidate that logic to a single place.
Also remove the CNode.fCurrentlyConnected bool, which is now
redundant. We can rely on CNode.fSuccessfullyConnected, since the two
bools were only ever flipped to true in the same place.
This is a backport of core#20291 [1/2]
https://github.com/bitcoin/bitcoin/pull/20291/commits/eefe19471868ef0cdc9d32473d0b57015e7647ee
Depends on D10697
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D10698