Add escaping of U+2028 and U+2029 inside the JSON encoder

NOTE: Don't actually merge this pull request, since we want to make this
v3.0.20.6, not merge it into v3.0.20.5.  The merge base is just set so we
can read a clean diff.

U+2028 and U+2029 are allowed inside strings in JSON (as are all literal
Unicode characters) but JavaScript defines them as newline separators.
Because no literal newlines are allowed in a string, this causes a
ParseError in the browser.  We work around this issue by replacing them
with the escaped version.  The resulting JSON is still valid and can be
parsed in the browser.

This change was based on https://github.com/rails/rails/pull/10534 in mainline Rails.

Let's get a lot of eyes on this:
@wyattdanger @schleyfox @LogicWolfe @jeffyip @nelgau @ericlevine @ajacksified @daveaugustine