websocket: Check frame->wsc in ws_frame_transmit for NULL.
Add frame.wsc == NULL check in ws_frame_transmit similar to the checks
in ws_close and friends and ws_frame_receive to avoid crashing if the
tcp connection was been terminated prematurely.
(cherry picked from commit c109755d347500d8dcfa92a75cb11c9cea2727c2)