Issue #767 Fix TcpOutput test hang

The output was being shutdown after the message was queued but
before it was sent causing the test to wait forever for the result.
Merge pull request #823 from mozilla-services/issue_767

Issue #767 Fix TcpOutput test hang