(#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.