[TASK] Cleanup \TYPO3\CMS\Lang\LanguageService

* Cache hsc values of calls to sL()
* Code cleanup
* Use !empty() instead of count() for objects known to be an array

Change-Id: Ie015f9755b98c41df185865325ea15ce42179e23
Resolves: #56109
Releases: 6.2
Reviewed-on: https://review.typo3.org/27745
Reviewed-by: Steffen Ritter
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Oliver Klee
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters