Fix handling of escapes in string literals

Backslash escapes were causing infinite loops and crashes.  I've put in a new `getString` and made stringification of string literals generate backslash escapes.

Uses JSON.parse because it's available in IE8+.

Note that bare newlines were previously allowed in string literals, and this code breaks that, so if that was intentional you may want to unbreak it.  Continuing a string literal onto a new line now requires a backslash before the newline.