Websocket JS class for handling websocket subs and calls (e.g. via ratchet php) with autobahn.js