[BUGFIX] Replace __DIR__ with absolute path in class cache

Since the directory constant __DIR__ is not always the same in all
environments (web, command line) we only allow absolute paths in the
class cache.

This requires the class cache to be cleared after the TYPO3 instance
was moved to another directory.

Resolves: #52885
Releases: 6.2
Change-Id: I0fc4c13d2977883e6881b5d7dda189813f97ae36
Reviewed-on: https://review.typo3.org/24840
Tested-by: Sebastian Fischer
Reviewed-by: Thorsten Kahler
Tested-by: Thorsten Kahler
Reviewed-by: Jigal van Hemert
Reviewed-by: Thomas Maroschik
Tested-by: Thomas Maroschik