instead of reusing the serversocket/serversocketchannel, they are repladed at every attempt to find a free port.

The reason to do so is because if multiple threads/processes are concurrently trying to find a free port, that
sometimes the serversocket gets corrupted and no matter if there are free ports, none will be found. Replacing
the serversocket on every try solves that issue.
* fixed typo
* fixed error with checking if no port is found
Merged #548