Use random available port in unit tests

This makes it possible to run the tests in parallel.