StringLowering: Escape the JSON in the custom section
Also add an end-to-end test using node to verify we can parse the escaped content properly using TextDecoder+JSON.parse.
PR now contains code point logic from Emscripten, that is hopefully correct... on a large real-world testcase it seems to parse everything properly at least.
I ported the warning from the JS code to be more defensive here, and I added more comments in general. Did you have anything else in mind for defense/readability?
I added test coverage for all escaped characters.
Last commit adds a test for a weird utf8 char, and fixes our handling of the escape codes.
I plan to try to rewrite this to be safer and easier to understand, so LGTM as-is for the short term.