Prior to this commit, the peer was connected, and then the services and
connectivity fields in the CNode object were manually set. Instead, send
p2p version and verack messages, and have net_processing's internal
logic set the state of the node.
This ensures that the node's internal state is consistent with how it
would be set in the live code.
Prior to this commit, dummyNode1.nServices was set to NODE_NONE
which was not a problem since CNode::fClient and
CNode::m_limited_node are default initialised to false. Now that we
are doing the actual version handshake, the values of fClient and
m_limited_node are set during the handshake and cause the test to fail
if we do not set dummyNode1.nServices to a reasonable value
This is a partial backport of core#25514 and core#25591
https://github.com/bitcoin/bitcoin/pull/25591/commits/fa7098947ceff1964812d430e769af6d1ad561bd (for Handshake)
Depends on D14745