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

this has to do with the stub for `scan_manifest`
when cache is refreshed the scanner is stubed so scan_manifest always returns two classes, since `scan_manifest` is called twice the result will have 4 classes.
The reason for calling `scan_manifest` twice is that it is called here:
```ruby
  modulemanifest = Dir.glob("#{path}/manifests/**/*.pp").map do |filename|
              scanner.scan_manifest File.read(filename), parser, filename
            end
```
and there are two file names that return from `Dir.glob`
when the cache doesn't need refresh then scan_minifest won't be called resulting in just two classes - those stubed in the cache