(PUP-2182) Fix yum and zypper providers virtual_package feature.

The yum and zypper package providers were installing virtual packages even when
allow_virtual was default or set to false.

For yum, the fix is to do a "yum list" command before doing an installation whenever
allow_virtual is not true.  The list command will fail on virtual
package names.  This will prevent the package from being installed as
expected and is only performed if a version is not ensured, since
virtual packages cannot be installed by version.

For zypper, the fix is to pass the --name option to zypper if not
allowing virtual packages and a version string was not ensured.
Merge pull request #2672 from peterhuene/pup/2182

(PUP-2182) Fix yum and zypper providers virtual_package feature.
(maint) Relax error match for dynmic env puppet apply test

When testing with future parser, a slightly different error message is
returned for a missing class. This patch just loosens the regex to
accept both variants.
Merge remote-tracking branch 'upstream/stable'

* upstream/stable:
  (PUP-2182) Fix yum and zypper providers virtual_package feature.
(PUP-2382) Create FFI typedefs for Win32 API

 - Add new file windows/api_types to contain global FFI typedefs
   that can be reused wherever we attach_function for FFI
 - Replace existing function definitions with new Win32 API style
   typedefs such as :dword, :lpcstr, :handle, etc
 - Fix some API definitions that were using incorrect FFI typedefs
   such as :ulong and :long.  In FFI, these typedefs are platform
   specific and will vary in size.  On Windows, these are fixed width.
   New Win32 typedefs of :win32_ulong and :win32_long were added
   to accommodate these in function definitions.
 - Fix replace_file by passing FFI::Pointer::NULL to match it's updated
   definition.
 - Where applicable, modify FFI::MemoryPointer.new to use the Win32
   typedef being created, so .new(:dword, 1) instead of .new(:uint, 1)
 - Prefix each attach_function with an ffi_lib for the dll it's
   actually loaded in.
 - Add missing documentation / links where helpful.

Paired-with: Rob Reynolds <rob@puppetlabs.com>
(PUP-2382) Standardize FFI module conventions

 - Extend FFI with attach_function_private, which allows adding an FFI
   definition to a module privately.  This is a bit simpler than nesting
   an 'API' module / clearer than FFI definitions inside a private.
 - Unfortunately this doesn't make class / struct definitions private
   but this shouldn't be an issue in a practical sense (and isn't a
   change to the previous behavior / design)
 - Refactored existing API definitions and settled on mirroring the
   Win32 names precisely.  In some modules, the API names had been
   ruby-ified, which led to collisions.  Using the casing of the Win32
   API calls is a sufficient hint to differentiate them from Ruby code.
 - Found missing values for TOKEN_INFORMATION_CLASS that were added to
   enum
(PUP-2382) FFI Puppet feature symlink test
(PUP-2382) Require windows/string earlier

 - To allow using windows/string as a mixin, require it earlier
Merge pull request #2641 from Iristyle/ticket/master/PUP-2382-standardize-FFI

(PUP-2382) Refactor Windows API FFI definitions / module conventions
(PUP-2385) Puppet::Util::Windows::File refactor

 - Use wide_string as mixin from Puppet::Util::Windows::String
(PUP-2385) FFI Puppet::Util::Windows::File

 - Convert Windows MoveFileEx to FFI
 - No longer need to require 'windows/api'
(maint) Adjust new environment tests to work with PE

The changes to these tests are in two main categories:

1) Changes to file owner and group to use beaker host references so that
correct user/group settings are obtained regardless of whether a FOSS or
PE run is being performed.  Also changes to permissions to be more
permissive for group so that the puppet system user running under
Passenger can access key files.

2) Changes to basemodulepath to ensure that the modules PE master needs
to run under its /opt site module directory are always present.

In addition a few cases had to be exempted on PE altogether, notably
tests which were testing the effect of commandline environment settings.
Since running a PE master with commandline settings would require
modifying it's rack config.ru file, these tests make little sense in
this context.
(maint) Fix problems when rspec-puppet and rspec-helper are both used

This fixes a problem that arises when there is more than one
puppet test infrasturcutre "orchestrator"; e.g. rspec-puppet and
rspec-helper. They both add calls to the TestHelper and this ends up
setting up and tearing down the puppet environment for each test.

This problem has existed for a long time, but was noticed when using the
new mark/rollback to ensure test consistency.

The fix os to add a re-entrance check for before_each and after_each to
ensure that they only do the job once even if registered to be called
a number of times.
Merge pull request #2682 from kylog/issue/pup-2610-make-test_helper-reentrant

(maint) Fix problems when rspec-puppet and rspec-helper are both used
Merge branch 'stable'
Merge pull request #2681 from jpartlow/maint/stable/environment-acceptance-fixes-for-pe

(maint) Adjust new environment tests to work with PE
Merge branch 'stable'
(maint) Test a different cert for extensions

The FOSS ssl/certificate_extensions test expects to be able to clear out
the ssl store and start again.  This is not feasible in PE; the solution
is to run the test against a differente certname.  Also leaving temp
dirs in place, because it makes it much easier to review the files that
were used when troubleshooting test failure.
Merge branch 'maint/stable/ssl-cert-ext-acceptance-fix-for-pe' into stable

* maint/stable/ssl-cert-ext-acceptance-fix-for-pe:
  (maint) Test a different cert for extensions
Merge branch 'ticket/master/PUP-2385-FFI-Windows-File'

* ticket/master/PUP-2385-FFI-Windows-File:
  (PUP-2385) FFI Puppet::Util::Windows::File
  (PUP-2385) Puppet::Util::Windows::File refactor