route: Reset state if JOIN fails by any reason
library: Use copy addresses at state_move_to_dht

Otherwise there still possible several connections between two server
nodes in case of dual stack (and connections will be through different
networks). Also it leads to races with undefined behavior.
Merge pull request #522 from euroelessar/master

Fix different error which may lead to route-list malfunction