GRAILS-11513 add more tests to cover all code paths in JSONObject.writeQuoted