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.