Replace the websocket_client with a gen_fsm backed implementation

This introduces breaking changes to the behaviour callbacks.