[TASK] Rename escapeJsValue and make it context specific

The stdWrap property escapeJsValue actually encodes the
content and should thus be called
encodeForJavaScriptValue. Also the value must be
enclosed in quotes to prevent it from being used outside
the target context of string values in JavaScript.

Releases: 6.2
Resolves: #57107
Documentation: #57108
Change-Id: Id5f850d36a87d71ca80eb58e3359ddacdd5b655e
Reviewed-on: https://review.typo3.org/28571
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers