[TASK] Cleanup

Replace \' with " in exceptions

Add missing PHP closing tag in StoragePermissionsAspect

Eestructure a select query in the
BackendUserAuthentication class.

Change-Id: Id161c761288be93b8f43a2f855254ac954c32d5b
Resolves: #51744
Releases: 6.2, 6.1, 6.0
Reviewed-on: https://review.typo3.org/23620
Reviewed-by: Sascha Egerer
Tested-by: Sascha Egerer
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring