Record javscript errors and make them available in the quickfix list

This meant changing the WebSocket protocol to a JSON-based message protocol, which is more amenable to further extensions.