Better open/close behavior for StreamTransport.

I use StreamTransport a lot to test functionality locally that otherwise uses a Socket transport. Current implementation of IsOpen returns always true, even though after a close, the whole transport is not usable.

This PR implements IsOpen, Open and Close that reflects the internal state and behaves more similar to other transports like TSocket.

Includes a test case.