[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