(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
Merge branch 'master' of https://github.com/puppetlabs/puppet