[TASK] Cleanup GeneralUtility::rmFromList

Simplifies the method. Avoids using array as intermediate. Work directly
with the string value instead.

Resolves: #53677
Releases: 6.2
Change-Id: I1abcd606a2699e959be1816c88cb147dbf557141
Reviewed-on: https://review.typo3.org/25723
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
Reviewed-by: Oliver Klee
Reviewed-by: Markus Klein
Tested-by: Markus Klein