Fix for #4894 -- retry tests if port is in use
If multiple processes are running the spec tests they may conflict trying to
listen on a port. If this happens the test waits 0.1 seconds and retries for
up to 100 times before marking the test pending due to too many conflicts.