(#22744) Filter virtual resources in the static compiler

Previously (on Lost), the static compiler was directly creating and
invoking the regular compiler and then modifying the file resources to
get the desired behavior. Because the static compiler was directly
invoking the regular compiler, it was not invoking all the methods that
would normally get called when the regular compiler was called by the
indirector.

This commit resolves this problem by making the static compiler inherit
from the regular compiler instead of delegating to the compiler. If
there are future changes to how the indirector invokes termini, the
static compiler will still be able to generate catalogs in the same
manner as the regular compiler.

Original patch by Chris Spence <chris.spence@puppetlabs.com>
(PUP-1099) Fix incorrect permissions in RPMs

The RPM spec template uses extremely restrictive permissions for `log`
and `lib` directories. These permissions were being incorrectly applied to
`examples` during packaging. This corrects that problem by resetting
default attributes after restricting `log` and `lib` directories.
(pup-546) Remove hiera2 support from binder

This removes hiera2 support from binder.
Tests are updated to use ruby based bindings for the same data bindings
as the removed hiera2 based bindings.
(pup-546) Remove automatic injector lookup for class parameters.
(pup-546) Remove hiera2.rb (central file with require's for hiera2)
(pup-546) Update default.rb and remove mention of hiera2

The documentation for the --binder setting is updated to reflect
that hiera2-data-in-modules is no longer loaded, while still allowing
bindings to be made in ruby, now referred to as "bindings in modules".
(PUP-546) Replace lookup function with something useful

With removed hiera2, the lookup function is not as useful and is
now replaced with the lookup from (#22574) which first looks in
bound data and then in hiera.

The intent is to use the technolgy agnostic "lookup" in the future
parser/evaluator to enable shorthand notation. The actual lookup
mechanism/technology is thereby not visible to the user.
(PUP-665) Allow settings to be undefined

Setting a value to nil used to result in falling back to the default (or
whatever came later in the lookup chain). This behavior was lost when
the settings were pulled apart into multiple classes to handle the
lookup. The error showed up in tests for stdlib that use rspec-puppet,
which depended on the "nil is default" behavior.
Merge pull request #2174 from zaphod42/maint/master/allow-settings-to-be-undefined

(PUP-665) Allow settings to be undefined
(packaging) Update PUPPETVERSION to 3.4.0
Merge tag '3.4.0'

3.4.0

* tag '3.4.0':
  (packaging) Update PUPPETVERSION to 3.4.0
(PUP-665) Setting nil reverts to default

The behavior of looking up settings was not entirely right from the
previous commit. The true behavior is:
  * Search through layers in the order of [cli, memory, environment,
    run_mode, main, application_defaults]
  * Find the first layer that has ever had the setting manipulated for
    it.
  * If the value for that layer is not nil use that value.
  * If the value for that layer is nil use the value from puppet's
    defaults.

This commit restores that behavior and adds a test to check that it
happens.
Merge tag '3.4.0' into stable

3.4.0

* tag '3.4.0':
  (packaging) Update PUPPETVERSION to 3.4.0
Merge pull request #2175 from zaphod42/maint/master/allow-settings-to-be-undefined

(PUP-665) Setting nil reverts to default
(maint) Use internal rubygems mirror during CI bootstrap
(maint) Set gem mirror conditionally
(maint) Windows file provider :links => :follow

 - Previously, the Windows file provider would raise an error when
   applying a catalog that contained file resources with `:links =>
   :follow`, when the given path was not actually a symlink
 - The behavior of readlink is essentially correct, as File.readlink on
   other operating systems yields Errno::EINVAL: Invalid argument
 - Therefore the appropriate behavior to match Puppet on other
   platforms is to behave like File.chown, which will operate on the
   link IFF it is one, or will operate on the file / dir directly if it
   is not a link
 - Corrected a minor issue in the creation of the error msg raised
   by the Windows implementation of readlink
Merge branch 'stable'
(PUP-546) Fix problems with lookup after removal of hiera2

Moved lookup functionality to separate helper class.
(PUP-665) Don't call hooks unless absolutely necessary

Calling hooks on configuration settings that don't have them forces the
code to interpolate any `$variable`s in the value of the setting. There
are a couple places where the hooks are called before everything has
been fully prepared (such as in initialize_global_defaults) and so run
mode settings such as confdir are not available.

This restores the old behavior in which only settings with hooks will
end up going down this path. This doesn't fully address the problem, but
it does make the surface area much smaller.