[CLEANUP] Address CGL violations

Try to cleanup most of the CGL violations reported by
metrics.typo3.org. Some are in the ext_emconf.php file
and cannot be resolved.

Resolves: #51686
Releases: 2.3
Change-Id: I9337a1fd6e8eb8dc7e806b362f73baf88347b6ed
Reviewed-on: https://review.typo3.org/30142
Reviewed-by: Francois Suter
Tested-by: Francois Suter