Node.join functionality is atterative

The previous approach was a recursive approach. The problem is that
with enoug retries, you will get a stackoverflow. With an iterative
approach this won't happen.

Also improved the logging a bit so it included the attempt number.
Merge pull request #1446 from pveentjer/fix/3.x/rejoin-not-recursive

Node.join functionality is iterative