Add debug_once to util/warnings

This function provides debounced logging for `Puppet.debug` similar to
`notice_once` and `warnonce`.
(#21835) Downgrade missing type optimization warn

For some catalogs, enabling `ignoremissingtypes` can produce a lot of noise in
the logs. This change downgrades the warning to a debug message and debounces
the logger so that messages appear only once per missing class or definition.
(#21839) Stringify the :_timestamp fact name

Change all instances of the `:_timestamp` fact to `_timestamp`. Symbols can be
converted to strings during a round-trip through a simple terminus such as
JSON. If the Fact is then updated using the symbol, there will be two names for
the same data.

After 5ac681f, in the 3.0 rc series, all varible names are explicitly
stringified when added to compiler scopes. This means that facts named
`:_timestamp` and `_timestamp` will end up mapping to the same scope variable
which violates static single assignment.
Merge pull request #1828 from Sharpie/21839-stringify-timestamp-fact-name

(#21839) Stringify the :_timestamp fact name
(#22128) Fixes rpm provider's nevra regex to work in yum prefetch

Work done for #19875 changed the rpm provider's regex for parsing
package information.  The yum package provider's prefetch method relied
on the earlier version of this regex and was broken by this change,
resulting in a failure to set latest_info when using yum and a series of
warning messages in the logs.

This change adjusts the rpm NEVRA_REGEX such that the added description
info is an optional capture.
(maint) Load puppetx for yaml_backend_spec

Depending on order of specs, dependencies might or might not be loaded
for Puppet::Pops::Binder::Hiera2::YamlBackend to resolve.

Ensures that YamlBackend's prerequisites are loaded in the spec.
PuppetX will only load the PuppetX::Puppet::Hiera2Backend that
YamlBackend extends if binder is true.

This is not a particularly lovely way of doing this in a spec, but the
YamlBackend implementation is intended to be lazily loaded by the
binding system.  There may be a better way of ensuring YamlBackend is
available for testing.
Merge pull request #1820 from Sharpie/21835-silence-ignoremissingtypes

(#21835) Remove missing type optimization warning
Merge pull request #1833 from jpartlow/issue/master/22128-yum-prefetch-failure

Issue/master/22128 yum prefetch failure
Merge branch 'stable'

Conflicts:
	lib/puppet/resource/type_collection.rb
(#18508) Create explicit dependencies before implicit

All of the explicit dependencies need to be added before any of the
implicit (autorequire) dependencies are processed. This is because we
skip an implicit dependency if it would interfere with an expicit one,
and if we don't have all of the explicit dependencies available the
system will end up creating implict ones that cause dependency cycles.
(#22128) Confine yum provider prefetch spec from running on windows

The new yum prefetch spec was failing on windows:

Puppet::Type::Package::ProviderYum prefetching injects latest provider
info into passed resources when prefetching
    Failure/Error: myresource = package_type.new(:name => "myresource",
:ensure => :latest)
    Puppet::ResourceError:
      Parameter ensure failed on Package[myresource]: Provider must have
features 'upgradeable' to set 'ensure' to 'latest'

possibly because the windows default package provider does not provide
the same features.  Since this test is specific to yum, confining it from
running on windows.
Merge pull request #1834 from jpartlow/issue/master/22128-yum-prefetch-failure-spec-confined-on-windows

(#22128) Confine yum provider prefetch spec from running on windows
(Maint) Fix testing path on windows

A file resource needs to have absolute paths, but a drive relative path
doesn't qualify as an absolute path on windows. This fixes the path used
for testing to be "absolutized" before use.
Merge pull request #1835 from zaphod42/maint/master/fix-path-on-windows

(Maint) Fix testing path on windows
(#22128) Yum prefetch spec ensures use of yum provider

The prefetch spec for the Yum package provider was failing on platforms
whose default providers did not have the same capabilities (definitely
on Windows for msi), because the previous implementation was generating type
instances of Puppet::Type::Package without setting their providers.
Consequently these instances were being generated with references to the
platform's default providers, and might fail to set :ensure =>
:latest due to missing capabilities.

The spec is changed to associate instances of yum providers with the
package type instances being passed into prefetch.  Also removed the
confine for Windows.

This also clears up a typo that got through in the original patch, which
was failing on only some platforms.
Merge pull request #1837 from jpartlow/issue/master/22128-yum-prefetch-failure-solaris-spec-fix

(#22128) Yum prefetch spec ensures use of yum provider
(#18508) Extract class to control generating resources

The logic for determining how to add generated resources into the
catalog was tightly bound with the rest of the transaction code. This
makes it hard to test the exact logic around that. By extracting a class
it exposes that logic in a much more testable form.
(#18508) Ensure eval_generated resources apply at the right time

Resources created with eval_generate need to apply with the same
priority as their parent resource.
(#18508) Handle duplicate generated resources correctly

When a generated resource duplicates a resource already in the catalog,
we want to avoid adding it a second time, but we still want to create
dependencies between the resource and the generating resource. For
example, we may have a recursive file resource, but explicitly model one
of the files that will be generated. We still want the explicit file
resource to depend on its generated parent directory.

This also refactors the resource generation methods, splitting them up
into smaller methods.
(#18508) Ensure that no two resources have the same priority

The underlying red-black tree that is used as the priority queue for
tracking what resources to evaluate will only allow a single value per
key. This means that when generated resources are added they need to get
unique priority keys. However there could be an arbitrary number of
these resources added in between existing resources. This commit
provides a Puppet::Graph::Key that behaves like the numbering scheme of
an outline so that priorities can be arbitrarily nested and the nested
priorities are between the priorities at the outer level.

The integration tests for the file type caught this error. It only
showed up when 2 unique, new resources are generated.