Escape control characters in JSON output

The JSON spec (http://www.json.org) says that control characters are not allowed in JSON, but Rust currently does not escape them. This PR escapes ASCII control characters in JSON output.
Well, I could make the match exhaustive with static strings, but it would be pretty long. Is that acceptable?