Add formatting option to `std.json.toJSON`.

This allows JSON to be used as a temporary serialization format when debugging an application as it becomes human- and diff-readable.