Updated to work with websockets 0.11.0, plus fixes

I updated and tested with websockets 0.11.0.  I did not work to make it backward compatibles, so if you pull this in probably should note that it the recommended version

Also added some robustness around the timer handling, and the disconnect.