only add [] to the uri if a proper ipv6 address is detected

Signed-off-by: Thomas Stilwell <stilwellt@openlabs.co>
Merge pull request #350 from benemorius/ipv6-fix

ipv6-regression-fix
clean up exception handling for ipv6 failover

Signed-off-by: Thomas Stilwell <stilwellt@openlabs.co>
Merge pull request #352 from benemorius/exceptions

clean up exception handling for ipv6 failover
fix corrupt saving of peers to persistent storage

persistent peer storage is actually broken before this commit, which
is what is preventing peer discovery from working right after a client
restart

peer discovery should now occur immediately after starting the client

Signed-off-by: Thomas Stilwell <stilwellt@openlabs.co>
don't override local ip address
debug output