Simplify code for JSON handling of ITP server protocol
The JSON layer of the ITP server protocol is currently done by ad-hoc Ocaml code. Adding a new construct in that protocol is currently painful and error-prone because several case must be added by hand. It should be simplified and made more robust by using an existing OCaml library, or some PPX-based thing, for producing JSON and parsing it.