New method getPeerToConnect

getPeerToConnect attempts to return a peer in the specified stream suitable for a connection attempt.

Fix import of time module