[TASK] Replace JavaScriptEncoder with json_encode()

The JavaScriptEncoder class is used a lot in the TYPO3 backend. It does
expensive character conversions, character by character.

It would improve performance a lot if we use PHP native json_encode to do
the encoding for us.

Change-Id: I3cb3bd6d887d49565fda496f9b13852cbeb9dfa1
Resolves: #54560
Releases: 6.2
Reviewed-on: https://review.typo3.org/26545
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Michiel Roos
Tested-by: Michiel Roos
Reviewed-by: Marcin Sągol
Tested-by: Marcin Sągol
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind