(#15106) Add acceptance test
(#15106) Use current environment in Puppet::Resource

When compiling a catalog, Puppet needs to access the environment in a
number of places to determine what's been loaded. Different classes
figure out what environment to load in entirely different ways and
frequently get it wrong. Moreover, the current environment is stored as
a thread local variable, but since Puppet can only run as a single
thread the current environment is effectively a global variable.

To make things even more fun, if the current environment is switched,
all state around the current environment is dumped and reloaded.

The end result of all of this wacky behavior is the following behavior:

  1. An ENC is in use
  2. There is no site.pp, not even an empty one.
  3. The `filetimeout` setting is either very short or a catalog
  compilation is very long.

This is not a complete commit message.
(#15106) Improve error messages on missing resource

The message `Error: Cannot find definition Class` is rather cryptic, and
doesn't indicate that the concept of a hostclass is gone. Instead it
indicates that there is a hostclass whose definition cannot be found.
This commit adds the type that's missing as well as the title to the
error message.