cockpitwebsocket: Refcount it

Preparatory patch for doing async I/O, where outstanding operations
will need to hold a ref on the data.

Signed-off-by: Stef Walter <stefw@redhat.com>
cockpitwebsocket: Use async reads/writes rather than copying thread

This is for the libssh port.  The gssh API is at the moment designed
to be entirely asynchronous, and emulating synchronous operations on
top is quite hard if we have to be threadsafe.

While the code for doing this async is a little bit more complex in
terms of a state machine, there is an offsetting complexity reduction
as well from not having explicit threading.

Closes #153

Signed-off-by: Stef Walter <stefw@redhat.com>
mock-echo: Do slow reads at first

This exercises partial read code appropriately.