(PUP-2732) Use less restrictive exec user validation

Without this patch Puppet agent validates the user attribute of exec resource that way, that it's fully unsupported if running without root user. Doing so, the following error message is printed and execution aborted:
"Only root can execute commands as other users". This patch ignores a given user to run the exec as if it's the same as the user actually running the Puppet agent process.
See https://tickets.puppetlabs.com/browse/PUP-2732 for more information.
(PUP-1186) Ignore PAX header in tar unpacking

Prior to this commit if you installed a puppet module built on a platform with
a tar implementation that adds PAX headers and your platform didn't have a native
tar implementation (Windows), the module would contain junk PaxHeader directories.

This is due to the default POSIX behavior programmed in to minitar (the ruby tar
implementation used for platforms with out native tar) for an unknown typeflag,
such as those used in PAX headers, is to treat it as a regular file and extract it.

This commit adds a pre-scan step to our use of minitar for unpacking that finds
all the files with standard typeflags (0-7) and then only unpacks those, thus ignoring
any Pax typeflags like 'x' or 'g'.
(PUP-2919) Enable win32-taskscheduler Ruby2 specs

 - Previously removed in 76cde1ba547b6aed12e8de0b4ec3d7339789ce01 as
   part of https://github.com/puppetlabs/puppet/pull/2846
 - Win32-taskscheduler is Windows x64 / Ruby 2 compatible, and therefore
   these tests can be re-enabled
(PUP-2919) Enable win32-eventlog Ruby2 specs

 - Previously removed in 9449105658cf9789b94cdae096fd904b92828fb8 as
   part of https://github.com/puppetlabs/puppet/pull/2846
 - Win32-eventlog is Windows x64 / Ruby 2 compatible, and therefore
   these tests can be re-enabled
(PUP-1471) Remove warning message about pausing Windows agent service

Puppet agent on windows now uses a win32-service gem which is 0.8.4 or
greater[1,2]. The warning message and inline comments are no longer
required now that the upstream bug was fixed[3].

[1] https://github.com/puppetlabs/puppet/commit/5a5e685bf835fb459d036d31f0078668f5802331
[2] https://github.com/puppetlabs/puppet/commit/784c3d17c4d3e666701559c529e46465e5dc417e
[3] https://github.com/djberg96/win32-service/commit/38eba9f1edee41c9fb1d89fc3dea11da0768baf9
Merge branch 'pr/2859'

* pr/2859:
  (PUP-1471) Remove warning message about pausing Windows agent service
(PUP-2732) Add tests for user validation

This addes some tests around the validation for the user of the exec
type. The user is only allowed to be set to a user different from the
current user if it is running as root on a POSIX system.
Merge pull request #2872 from highb/fix/master/pup-1186_pax_header

(PUP-1186) Ignore PAX header in tar unpacking
(maint) Use parameter matchers in tests

This uses the mocha parameter matchers in the tests rather than a custom
with() block. This is a little shorter and should provide better error
messages when it fails.
(maint) Use real resource for testing shell provider

The shell provider tests were creating an invalid configuration of
objects in order to test. The resource needs to be an instance of the
:exec type, not a Puppet::Resource.
(PUP-2732) Test ignoring of user parameter

When the user parameter is specified, but it is the same as the current
user, there isn't any need to control the user when executing the
command. This adds a test in the posix provider for this shared
behavior. There don't appear to be many tests for how exec works at all.
(PUP-2881) Taskscheduler HRESULTs as 2s complement

 - When an HRESULT is returned from an FFI call to a COM method, the
   value is returned as an unsigned 32-bit integer.  It is a 2s
   complement style number that is typically -2XXXXXXXXX.  However, our
   HRESULT constants are defined in a way that doesn't ultimately
   represent them as 2s complement, which yields failures when giving
   them special treatment during error handling.  In other words, the
   errors we think we're ignoring are not actually being ignored,
   resulting in acceptance test failures.
Merge branch 'pr/2742'

* pr/2742:
  (PUP-2732) Test ignoring of user parameter
  (maint) Use real resource for testing shell provider
  (maint) Use parameter matchers in tests
  (PUP-2732) Add tests for user validation
  (PUP-2732) Use less restrictive exec user validation

Closes #2742
Merge pull request #2877 from Iristyle/ticket/master/PUP-2881-HRESULT-error-constants-2s-complement

(PUP-2881) Taskscheduler HRESULTs as 2s complement
Merge pull request #2875 from Iristyle/ticket/master/PUP-2919-remove-win32-taskscheduler-ruby2-pending-tests

(PUP-2919) Remove Windows / Ruby 2 pending specs
(maint) Use Struct::Passwd instead of Etc::Passwd

The return type of Etc.getpwent (and friends) is available as
Etc::Passwd in ruby 1.9.3 and later. However that constant doesn't exist
in ruby 1.8.7. However the docs refer to the type as Struct::Passwd,
which turns out to be available on 1.8.7, 1.9.3, 2.0.0, and 2.1.0.