Pass wrapped real scope to DataBinding

We were passing only facts into the DataBinding terminus, but Hiera needs to
be able to lookup variables on the scope. We now pass a scope, but wrap it
with Puppet::DataBinding::Variables to avoid exposing anything but variable
lookup.

This fixes the error in Puppet 3.0rc7 where variables like %{environment} were
not properly interpolated in hiera.conf (and likely elsewhere).
Revert "Merge branch 'revert/3.x/faces_from_modulepath' into 3.x"

This is a "revert-the-revert" commit.

This reverts commit 87ea7a8849f90a232f2bb683fb8a2ce1573a21db, reversing
changes made to 8dff14b9c5a3cdd99ede63dbcbb2dbe00b457926.
(#15214) Remove confdir and vardir from run_mode

Prior to this commit, the vardir and confdir settings were tied to
run_mode.  This caused a chicken-and-egg problem where you could not
initialize the confdir and vardir until you'd loaded the
application/subcommand, because that is the first point in time where
you'd know the run_mode.  However, without knowing the confdir/vardir
ahead of time, it's impossible to know where all you might need to look
to try to find the application/subcommand for loading.

This commit decouples those settings from run_mode.  The default values
for them are now set solely based on whether the user is root or not.
Individual applications may override these defaults a bit later in the
life cycle (e.g., 'master' does this).

Conflicts:
	lib/puppet/settings.rb
	lib/puppet/util/autoload.rb
	lib/puppet/util/run_mode.rb
	spec/unit/util/run_mode_spec.rb
(maint) Fix Failed to load face errors

Without this patch applied Telly will spew out a bunch `Error: Failed to
load face foobar` errors when `puppet help` is run.  These errors look
like:

    Error: Failed to load face help:
    no such file to load -- puppet/face/0.0.1/help
    Error: Failed to load face ca:
    no such file to load -- puppet/face/0.1.0/ca
    Error: Failed to load face catalog:
    no such file to load -- puppet/face/0.0.1/catalog
    Error: Failed to load face certificate:
    no such file to load -- puppet/face/0.0.1/certificate
    Error: Failed to load face certificate_request:
    no such file to load -- puppet/face/0.0.1/certificate_request
    Error: Failed to load face certificate_revocation_list:
    no such file to load -- puppet/face/0.0.1/certificate_revocation_list
    Error: Failed to load face config:
    no such file to load -- puppet/face/0.0.1/config
    ..etc.. for each face, but then see the regular help output.

The problem is that the regular expression changed in a previous patch
in my #7316 work, causing load errors resulting from checking for
version specific faces to pass through the exception handler.

This patch fixes the problem by tightening up the regular expression to
catching both version specific faces and "current" face load errors.

The `Puppet.debug` statement is also wrapped inside of a conditional so
that we don't log spam and we can accurately see if we're actually
loading multiple times or not.  The expectation is that `require` will
only load the file once and return false on subsequent calls.
Merge branch 'fix/3.x/7316_load_faces_from_modulepath_try3' into 3.x

* fix/3.x/7316_load_faces_from_modulepath_try3:
  (maint) Fix Failed to load face errors
  (#15214) Remove confdir and vardir from run_mode
  Revert "Merge branch 'revert/3.x/faces_from_modulepath' into 3.x"
(#16221) Make undef not override default parameters

In 2.7.x, passing undef as an argument to a parameterized class will result in
the argument using the default value given in the class definition. This was
inadvertently changed, so the variable would not be set at all. This change
reverts to the 2.7.x behavior.
Extract methods from set_default_parameters and improve test coverage

Refactor the set_default_parameters method in Puppet::Resource to be split
into several methods and improve the test coverage around default parameters
and undef.
Revert "Merge branch 'fix/3.x/7316_load_faces_from_modulepath_try3' into 3.x"

This reverts commit b277bb3874ecd50e1cd6e600bf6d36e3240d5510, reversing
changes made to bdf193640701e9a107b1c6f6661499b31fdefb4d.

These changes are being backed out because they referenced a undefined
methods (`default_global_config_dir` and `default_global_var_dir`).
After fixing that locally, there was still a problem with `puppet help`
printing out a large number of warnings because it could not load face
code correctly.

I think we need to step back from this, re-evaluate what is happening,
and try a new approach.
Stub DataBinding in undef param tests

This was causing failures when hiera was not configured properly since we
aren't trying to test hiera in these tests.
(#16567) Remove :lexical setting default

This default is not used, nor does it appear to have ever been used.
Merge branch 'ticket/3.x/16567-useless-setting-for-lexical-scope' into 3.x

* ticket/3.x/16567-useless-setting-for-lexical-scope:
  (#16567) Remove :lexical setting default
Update default cows and mocks

Previously, the default mocks and cows were set to build for both arches.
Because puppet is a noarch package, building against i386 mocks and cows is
sufficient and reduces overall build time. This also adds cows for debian
stable and unstable.
Merge pull request #1185 from haus/maint/3.x/update_default_cows_and_mocks

Update default cows and mocks
Updating PUPPETVERSION for 3.0.0-rc8
Update description of HTTP/HTTPS report

The HTTP report handler can now support HTTPS. This commit updates its
description accordingly
Merge pull request #1186 from nfagerlund/http_report

Update description of HTTP/HTTPS report