New method connectFailed

connectFailed is called with the peer and stream number of a connection attempt that was refused or timed out. The peer is removed from knownNodes if is too old and its stream contains a sufficient quantitiy of nodes.

Fixed some imports
Implemented logging pattern