Websocket: Only send when the socket is open.

Sending used to be allowed in state CLOSING, which could result in an
assertion failure during finalize.

Fixes #102.

We either need to make sending during CLOSING work, or refrain from doing it.  With the current state, cockpit-ws dumps core when we try to send during CLOSING.