(PUP-751) Check for reparse once per compile

Previously, whenever the known_resource_types
(Puppet::Resource::TypeCollection) was retrieved from the
environment it would check if there were any files that needed to be
reparsed. If any files needed a reparse, then the entire TypeCollection
was thrown away and redone.

In most cases the reparse check did not need to touch the filesystem
because the Puppet::Util::PeriodicWatcher would return a cached result
until the filetimeout had expired. Unfortunately the check was done so
often that the overhead of simply checking if enough time had passed
caused it to take a considerable amount of time.

This changes it so that the environment's known resource types are only
recalculated if the new check_for_reparse method determines that it
should. The new method is only called at the beginning of a compile and
so the files will never be checked while a compilation is being
executed.