(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
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 pull request #2175 from zaphod42/maint/master/allow-settings-to-be-undefined

(PUP-665) Setting nil reverts to default
(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.
Merge pull request #2178 from zaphod42/issue/master/pup-665-interpolating-variables-too-early

(PUP-665) Don't call hooks unless absolutely necessary
Merge branch 'stable'

* stable:
  (PUP-1099) Fix incorrect permissions in RPMs
(PUP-1133) Windows tests write config to temp

 - Previously tests were writing to the shared
   %ALLUSERSPROFILE%\PuppetLabs\puppet directory, and would blow
   up if this directory did not exist
 - Because this directory was shared from one run to the next, failing
   tests could be masked by data generated / used by a locally installed
   Puppet
 - The stubbing of FileSystem::File.exist? to return true was causing
   some tests to treat files like c:\dev\null\foo to attempt to be
   loaded, which would cause these tests to fail in isolation, but not
   when run within the suite
 - Had to change some doc specs under Ruby 1.9 / OSX to verify a value
   instead of asserting a method was called, to prevent a stack overflow
 - In some unit tests, the process of reading / writing settings caused
   issues with test loading, so Puppet.settings.use has been stubbed
(PUP-1133) Reset permission on Windows test files

 - Previously some security tests manipulated file permissions in
   a way that made it impossible for the top-level spec temp file
   cleanup to be performed.  This patch resets the files after runs.
(PUP-1133) Clean up leftover parser generate temp

 - Files were created without going through tmpfile as they needed
   specific extensions
(PUP-1133) Cleanup Windows symlink

 - Windows symlinks, when targeted at directories, do not get cleaned up
   if not unlinked, even when going through the global tmpfile