[views] Add missing JSON Content-Type
(LaurentP talking) This started as a fix to https://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/307 and ended up being a more broader fix that now translate CW RemoteCalledError to pyramid errors with the right content type and correctly returns them as application/json instead of text/html.
Result of today hackaton.
For reference here are:
- the first non working version of this MR (because of the exceptions hell) https://forge.extranet.logilab.fr/cubicweb/cubicweb/-/tree/topic/default/missing-json-content-type
- another working attempt but way less clean https://forge.extranet.logilab.fr/cubicweb/cubicweb/-/tree/topic/default/missing-json-content-type-2