(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-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.
(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.
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