Find a free port to bind to more robustly
Find a free port to bind to more robustly

Finding a free port to bind has always been a thorny problem,
particularly when running parallel tests: parallelism introduces a race
condition where two processes think the same port is free.

This commit improves the behavior by picking the port based on the
millisecond, and furthermore binds to that port for a millisecond to
make sure it's really, truly available.

It also allows a reduction of a 50-millisecond sleep to a 1 millisecond
sleep.

I'm quite proud of this algorithm.

cunnie/sslip.io,cunnie/sslip.io,cunnie/sslip.io,cunnie/sslip.io