Call websocket methods from main thread

The websocket can get locked up when too many calls to it's `send` method are executed from a different thread than the thread it was created on.

Fixes #137
Merge pull request #138 from Simperium/issue/137-websocket-threading

Call websocket methods from main thread