Change JsonResponse to use symfony's encodingOptions which allows option...

...s to be changed after construction. Closes 5532.