Refactors TCP Connector's worker termination logic.

This PR will rid Hive of occasional client crashes caused by restarting TCP connector workers.