[BUGFIX] ClassLoader: Clear after Exception

Clearing the class cache and release the lock if an exception was
thrown while generating the class loader cache.

Resolves: #61900
Releases: master, 6.2
Change-Id: Iaac534e9cf333fe29f9ac90aed118cc953f857fe
Reviewed-on: http://review.typo3.org/34162
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>