libs/web: fix luci.http.write_json() to properly encode control chars in strings