Stability and performance issues

The issues I encountered and fixed are:

- out of memory exception because the buffer allocated in the
'ResponseConsumerThread' is recreated for every read.
- The payload returned in the call back contains the full buffer (so
8192 bytes), rather than the length of the data received.
- Errors like end of stream are not detected because the check for end
of stream (inputstream.read==-1) is ignored.
- Errors on stdout are not treated and can potentially block all further
stdout stream until the stderr buffer is cleared.
- The mechanism in the response producer with the blockingQueue seemed
to be another performance bottleneck (not 100% sure here).

I took a ganymed (now trilead) example from 'SingleThreadStdoutStderr'
and merged it into 'ResponseConsumerThread'.
I also created a new method (isConnected) so I can verify if a
connection is up/down or stale.