web socket changes

Move the WebSocketThread class to its own module
Add some disconnect and reconnect retry logic
Add some error handling to the WebSocket client calls
Add a logging helper func and use the new logging level