[TASK] Add/drop usage of preg_quote() where needed

In some places preg_quote() is not used or is used incorrectly.
In other places there are preg_quote() calls which had no
real function.

Change-Id: If201394036d17a68cea41903f849c6c5ea11b069
Releases: 4.5, 4.6, 4.7, 6.0, 6.1
Resolves: #36793
Reviewed-on: https://review.typo3.org/19929
Reviewed-by: Andreas Wolf
Reviewed-by: Stefan Neufeind
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert