fix: Improve JSON parsing (e.g. code) from weak LLMs
Uses the excellent, lightweight [json-repair lib](https://github.com/mangiucugna/json_repair).
One example where this helps: when using tools, weak LLMs sometimes generate JSON that has un-escaped newlines within strings.
If we simply discard these, it's problematic when the strings contain newline-sensitive code (e.g. python, toml).
Instead we should escape these newlines, but ONLY escape the newlines that appear within string-valued fields in the JSON
(newlines that appear outside of these should definitely NOT be escaped, or it leads to inaccurate json).
Fortunately, the excellent json-repair lib has a good solution for this and other pesky json issues, using CFGs.