Cafeinated version of reconnecting websocket

with support for different socket backends such as sockjs