`quote` seems to be pretty slow to me, as we are basically just copying every single character. Perhaps we could use a `RegExp` to detect if control characters are used before doing this, instead of just copying every character in a string blindly. We could also use `String#replace`, like JSON 2's implementation.