Implement random free port selection for Tribler.