PRQ-144: Fix the TCP input so it passes unit tests and does not drop messages under load.
Merge pull request #1170 from Ludovicus/LOGSTASH-1824

LOGSTASH-1824 Fix the TCP input so it passes unit tests and does not drop messages