_socket type is now Socket and not StringSink

The side-effect was the addition of a mock Socket class to be used during tests.
As we were using StringSink before as a convenient way for the tests to pass
with replacing the Socket by a StringBuffer, changing StringSink to Socket made
the setUp() failing with:
Caught type 'StringBuffer' is not a subtype of type 'Socket' of 'value'.

We now have our own stub Socket for the tests that is conveniently using
a StringBuffer.
Add 2 tests for the closing functionality