INT-2903 Fix Timing Problem in TCP Timeout Tests

Use latches and the new CLOSE event instead of arbitrary waits for
sockets to close.

Factor out common test code into setup methods.

removed system.out
Merge pull request #797 from garyrussell/INT-2903

* INT-2903: Fix Timing Problem in TCP Timeout Tests