Add ping failed stats. Refactor data sending

- websocket now sends a JSON blob that can be injected directly
  into the backbone.js model