[BUGFIX] Cache missing class information only in productive context

To improve cache handling during development, missing class information
shouldn't be cached anymore. Otherwise each time a class was misspelled
and not found we have to clear the classes_cache.

Resolves: #61475
Releases: 6.3, 6.2
Change-Id: I7de24348e84bd89afd81164b90f776a996fcb8d9
Reviewed-on: http://review.typo3.org/32686
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>