tidied up websocket a little

so now the write to the websocket in the api's websocket handler uses the connection's writePump. If the send to the write pump fails for whatever reason, we treat that websocket as dead and the handler returns noisily. With any luck should solve all sad websocket problems.