Make port selection automatic in thrift/lib/hs/tests:threaded-tests
Make port selection automatic in thrift/lib/hs/tests:threaded-tests

Summary:
Unit tests were failing because port number was hardcoded. Instead, we now let `bind` assign us a random free port.

First revision tried to bind to a socket with a free port, and pass the bound socket along. Second revision grabs a free port, frees it and passes the port number along, and then we pray that there aren't race conditions where the port isn't unbound fast enough or another process on the server grabs it before the test runner can.

Reviewed By: vitaut

Differential Revision: D13056833

fbshipit-source-id: 34987dcd552384cbc808e9f11020ca474c0d1040

facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift