(PUP-266) Ensure ADSI Group SIDs may be looked up

 - Previously, calling Puppet::Util::ADSI::Group.exists? for a
   well-known group SID would return false, because the WinNT:// style
   URI used to find the group would not examine / lookup the SID, but
   would instead create a broken Uri that the underlying OS could not
   understand
 - Now, the given group name is checked to see if it's a SID before the
   Uri is constructed, and a SID style Uri is created where appropriate
(PUP-266) Puppet manages group and owner on config

 - Previously, Puppet would ignore the configuration in defaults.rb for
   setting a group / owner on a given file or directory -- even when
   the Windows machine was running with administrative permissions
 - Since Windows now has the capability of properly setting a group
   and owner, allow Windows to manage these permissions when
   appropriate
 - The existing Puppet::Settings::FileSettings::Service class
   depends on looking up the appropriate default service accounts
   for use in a number of locations. To fall in line with this usage
   pattern, "Administrators" is set as the default owner and
   the "Service" group S-1-5-6 is set as the default group.  This
   special OS managed group includes all accounts with the logon
   as a service token privilege.
(PUP-1118) Fetch the environment's manifest & modulepath at init

After trying to get the manifest and modulepath during the
initialization for an environment, it turned out that a lot of other
things depended on a very specific load order. Some of those needed to
change around, others needed to delay executing until later, after
everything had been loaded and initialized (creation of the root
environment was one of these). The reset of the Parser::Functions also
moved so that it doesn't happen until settings have been initialized.
Don't run LANG/LC_ALL tests on windows
(PUP-1404) Don't swallow execpipe tests on windows
Merge branch 'ticket/master/18342-windows-file-setting-owner-group'
(maint) really fix the execution locale test
Merge pull request #2266 from aperiodic/maint-fix-execution-tests

(maint) really fix the execution locale test
(PUP-1118) Introduce "create" to make specific environments

Environments are more than just a name, they are also a modulepath and a
manifest. This commit makes a "create" method for setting up
environments with specific modulepaths and manifests rather than relying
on the Puppet Settings at the time that methods are called. In order to
control environments for module installation they now take advantage of
this in order to control the modulepath that things will be installed
into.
(PUP-1118) Provide context at initialization for environments

When puppet is initialized it now also sets up a environments service so
that other parts of the code and go about their merry way.

This also changes the handling of component to work the same way as
other types so that an extra, and confusing, require isn't needed.
(PUP-1447) Added unless_uid option to User Resource management.
(PUP-1447) Merge branch 'feature/master/PUP-1447-unless_uid_option_resource'
(PUP-1448) Validates the user type shell property

Adds the feature :manages_shell to the user type and asserts that
providers manipulating the shell property must have this feature.  The
useradd provider is then patched to specifically check that the shell
property is valid (file exists and is executable).  Other providers
which use shell (user/aix, user/directory_service, user/ldap, user/pw)
have the :manages_shell feature added to ensure that they continue to
function, but no additional validation is performed.

Rebased to a more recent master from Alejandro Ramirez's PR
https://github.com/puppetlabs/puppet/pull/1942
(Commits squashed)
(Maint) Alias TESTS as TEST

Sometimes we type one, sometimes the other. Just make them aliases.
(PUP-1118) Remove use of Environment.current

One does not simply change the current environment!

This replaces use of Environment.current= and Environment.current with
Puppet::Context.lookup(:current_environment). This uncovered a lot of
assumptions about what the current environment is at various times, such
as during startup before initialization. There is now a "bootstrap"
context that is setup as soon as possible which provides a basic setup,
once initialization occures this is overridden with another context that
is able to do more.
(PUP-1118) Move global context methods to Puppet

This moves the global context handling out of the Puppet::Context class
and onto the Puppet module, which allows Puppet::Context to be a more
generic, overridable context system. It also allows references to
context information to be a little bit shorter.

This doesn't tackle making settings information available in the
context, and so there might be a little confusion between Puppet[] and
Puppet.lookup.
Merge pull request #2265 from jpartlow/feature/master/pup-1448-validate-user-shell

(PUP-1448) Validates the user type shell property
(Maint) Mark new context methods private

Let's keep these private a while longer until they have settled down a
bit more.
(Maint) Unravel require of forge code

This changes it so that the puppet/forge file handles pulling in all of
the forge related code and thereby sidesteps all sorts of load order
issues.
Merge pull request #2271 from zaphod42/feature/master/pup-1118-implement-environment-directory

(PUP-1118) Introduce explicit environments