Connection strategies

Make the selection of which peers to connect to a configurable strategy.

When doing the peer discovery round and selecting which of the discovered peers to connect to a connection strategy is consulted. Only the peers that the strategy selects will be connected to. The same applies for automatic reconnections on UP and NEW_NODE events.

The default strategy is, as before, to connect only to nodes in the same data center as the seed nodes, but this has also been extracted into a strategy – although one that gets some extra help by being created just after the seed nodes have been connected.