Make ws_send/2 thread-safe (i.e., avoid multiple threads writing to
the same websockets interleaved).