Fixes #8210 - Adding caching for smart-proxy puppet classes using Stefan Julin's implementation of cache

'parser' appears to be a transient parameter: it's not being used in ClassScannerBase#scan_directory, but rather is passed on to ClassScanner.scan_manifest/ClassScannerEParser.scan_manifest. You can instantiate correct parser in those methods instead.