WebSockets: only poll IO stream when needed

Instead of having two pollable sources constantly running, always try to
read/write without blocking and start polling if the operation returns
G_IO_ERROR_WOULD_BLOCK. This patch also fixes test
/websocket/direct/close-after-close that was passing but not actually
testing what we wanted, because the client close was never sent. When
the mutex is released, the frame has been queued, but not sent.
1 job for master in 1 minute and 3 seconds
Status Job ID Name Coverage
  Test
passed #409876
ipv6
fedora-meson-x86_64

00:01:03