[TASK] Optimize performance of the class loader

This change eliminates some file_exists calls and removes
an expensive regex that validated the class name.

Resolves: #53029
Releases: 6.2
Change-Id: I3d9ead0c3cdb999a540d303c8bd0709d4b827efd
Reviewed-on: https://review.typo3.org/24950
Reviewed-by: Sebastian Fischer
Reviewed-by: Wouter Wolters
Reviewed-by: Alexander Opitz
Tested-by: Alexander Opitz
Reviewed-by: Stefan Neufeind
Tested-by: Wouter Wolters
Reviewed-by: Dmitry Dulepov
Tested-by: Dmitry Dulepov
Reviewed-by: Thomas Maroschik
Tested-by: Thomas Maroschik