(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.
(PUP-1150) Fix race condition in Puppet::Util::Lockfile.

Before this commit, Puppet::Util::Lockfile.lock called the locked?
method before opening the @lockfile for write. Checking that the file
doesn't exist and creating the file were not an atomic operation, which
allowed two processes to detect that the file didn't exist and open it
for write simultaneously.

This commit adds and used Puppet::FileSystem::exclusive_create wrapper
that sets the following options:

 * File:CREAT - Creates the file if it doesn't exist.
 * File:EXCL - Fails if the file does exist.
 * File:WRONLY - Opens the file for write only.

File:EXCL is the important option, callers will recieve an Exception if
the file exists, meaning another process has acquired the lock. If the
file doesn't exist it will be created atomically, so other another
caller cannot create the file in the gap.
Merge branch 'pr/2168'

* pr/2168:
  (PUP-1150) Fix race condition in Puppet::Util::Lockfile.

This closes GH-2168.
(PUP-1404) execpipe resets LANG and LC_ALL

Puppet::Util::Execution.execpipe always run commands with LANG="C" and
LC_ALL="C" to avoid localized output.
(PUP-1404) Add tests for execpipe locale setting
(PUP-1404) Merge execpipe locale settings (#2234).

This merges in the changes to execpipe to reset LANG and LC_ALL to C in
order to get default program output, and tests for the changes.
(pup-1369) Add package_settings property for package

This changeset adds the package_settings property to "package" type. It's
intended to be used mainly with FreeBSD ports to control port options on
installed packages (the options normally set with make config).

The sole implementation of package_settings is delegated to providers. This
changeset only introduces package_settings feature and property to package
type (this initially defines an interface between package type and
provider used to handle package_settings).
(PUP-1404) LC_ALL test to actually tests LC_ALL
Merge pull request #2264 from kylog/issue/pup-1369/add-package-settings-property

(pup-1369) Add package_settings property for package
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'
(PUP-1432) Add V2 API structured errors.

This commit introduces error responses, a JSON object as described
in the api documentation (with associated schema).

It introduces the Puppet::Network::HTTP::Issues module, which collects
the known issue_kind values, in order to ensure consistency and provide
ability to yardoc them.

It adds two HTTPError subclasses for future use: an HTTPBadRequestError
(400 response), and an HTTPServerError class. The HTTPServerError
allows the API to provide more information about an unexpected error
than simply letting the error bubble up to be caught by the generic
HTTP handler.
(PUP-1432) Move JSON error ser8n to error classes

Rather than serializing in the generic HTTP handler.
(PUP-1432) Fix error JSON schema

The type of the items in the stacktrace array was not correctly
specified.
(PUP-1432) Add error spec that tests serialization
(maint) really fix the execution locale test
Merge pull request #2266 from aperiodic/maint-fix-execution-tests

(maint) really fix the execution locale test