Suppress misleading warn. in openbsd provider

I have observed that `pkginfo` command used as `listcmd` by `ports`
package provider sometimes outputs extra messages to stdout (the message
starts with `Updating the pkgdb`). This causes puppet to issue its own
warning as the line obtained from `listcmd` is not a valid package name.

This patch suppresses this spurious message.
(maint) Fix acceptance test for scheduled_task deletion

This test was accidentally checking that the scheduled task was still in
place in the Windows scheduled task list. Because the
Win32::TaskScheduler#delete call seems to be asynchronous, as long as
the test for scheduled task happened fast enough, it was still seen as
present and the test 'passed'.  In fact, puppet resource was scheduling
the task to be removed, and it does get removed.  This test began to fail
when the vms slowed down enough that the broken verification step began
to fail because it was no longer executing fast enough to see the
transient task prior to its deletion completing.

This change corrects the verification step to verify by asserting that
the schtasks.exe list command failed (did not show the deleted task).
And it wraps it in a timeout to allow it a few seconds for the scheduled
tasks state to finalize.
(maint) Correct documentation of each function

The documentation of the each function used deprecated syntax.
PUP-1322 Do not fail hard on unparseable files
Merge pull request #2256 from jpartlow/maint/stable/fix-scheduled-task-delete-acceptance

(maint) Fix acceptance test for scheduled_task deletion
(PUP-1389) Ensure wide strings have double null terminators

It seems that calling String#encode('UTF-16LE') sometimes adds only a single
NULL terminator in both ruby 1.9 and 2.0 on Windows. However, a wide string
is supposed to have two NULL terminators.

For reasons unknown, versions prior to 2012 seem to accept wide strings with
only a single NULL terminator, but in 2012 and 2012R2 the string is often times
contains a non-zero high byte, which causes Windows to read past the single
terminator, and attempt to access a path that does not exist.
(PUP-1389) ReplaceFile to FFI / move wide_string

Puppet::Util::Windows::File.replace_file now calls FFI to
replace files in place on Windows.
Puppet::Util::Windows::File.wide_string has now been moved to
Puppet::Util::Windows::String.wide_string.

This moves wide_string to lib/puppet/ubilt/windows/string.rb,
adds specs concerning different encodings.

In addition, we've removed Windows::API::WideString usages from
everywhere it was found as it is known to cause issues with Windows 2012.
Puppet::Util::Windows::Process.lookup_privilege_value in particular was
changed to use LookupPrivilegeValueA (ANSI) as we control the privilege name
being passed to it.

Paired with Josh Cooper <josh@puppetlabs.com>
(maint) Fix unused argument and variable in file_spec.rb
(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
Merge pull request #2260 from glennpratt/patch-1

(maint) Fix unused argument and variable in file_spec.rb
(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-1389) Simplify logic for appending extra NULL

This commit simplifies the process for appending a NULL terminator to
the wide string.
Merge branch 'pr/2261' into stable

* pr/2261:
  (PUP-1389) Simplify logic for appending extra NULL
  (PUP-1389) ReplaceFile to FFI / move wide_string
  (PUP-1389) Ensure wide strings have double null terminators
Merge pull request #2051 from ptomulik/fix/package_openbsd_spurious_warning

Suppress misleading warn. in openbsd provider
(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).