This fixes a bug that has been introduced in D15850. The AlreadyConnectedToAddress() function needs to filter on IP only to prevent the node from initiating an outbound connection to a peer that is already connected as an inbound.
This is a partial revert of rABC02b4774d7c2400b7e5a6f63f2e1ed2d01192c33e.
Depends on D15898.