(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
Merge remote-tracking branch 'upstream/stable'

* upstream/stable:
  (maint) Test a different cert for extensions
(packaging) Update PUPPETVERSION to 3.6.1
Merge branch 'stable'

* stable:
  (packaging) Update PUPPETVERSION to 3.6.1
(PUP-836) FFI Puppet::Util::Windows::User

 - LogonUserW, LoadUserProfile, UnloadUserProfile and PROFILEINFO
   have been converted from manually packing params with Win32API.new to
   automatically managed with FFI definitions.
 - Use MemoryPointer where appropriate.
 - Note that wide character LogonUserW is used rather than platform
   varying LogonUser as FFI is unable to use that.  The pointer
   widths of PROFILEINFO vary depending on platform, which is handled
   by using :pointer.  With LogonUserW the string pointed to is always
   wide character, which is properly handled by using wide_string.
 - Add FFI::MemoryPointer helper read_handle
 - Add FFI::MemoryPointer.from_wide_string and corresponding tests that
   ensure that a properly terminated UTF-16LE string is passed in
 - Add FFI::MemoryPointer#read_wide_string that reads a wide string buffer
   into a Ruby string with Encoding.default_external and corresponding tests
 - Add additional tests around User methods that make native Win32 API calls
   that will intentionally fail
 - Fix wide_string helper to return nil when given nil so that can be passed
   directly to Win32 as a null pointer
(PUP-836) FFI Puppet::Util::Windows::User

 - Remove dependence on Win32 API calls defined in the win32-security
   gem, including CreateWellKnownSid, IsValidSid, CheckTokenMembership
 - These calls have all been FFI'd accordingly
 - Add FFI::MemoryPointer helper read_bool
(PUP-836) Remove Win32::Security.elevated_security

 - Refactor Puppet::Util::Windows::Process to implement new method
   elevated_security? that was in win32-security gem
 - Refactor get_token_information to return an FFI::MemoryPointer buffer
   instead of a parsed structure, since GetTokenInformation is a generic
   call that can return many structure types, including TOKEN_ELEVATION.
 - Remove any reliance on win32-security gem from user.rb
 - Adjust tests accordingly
(PUP-836) FFI Puppet::Util::Windows::User

 - Remove dependence on Win32 API calls defined in the win32-security
   gem, including CreateWellKnownSid, IsValidSid, CheckTokenMembership
 - These calls have all been FFI'd accordingly
 - Add FFI::MemoryPointer helper read_bool
(PUP-2544) Util::ADSI -> Util::Windows::ADSI

 - Move Windows ADSI code out of puppet/util and into
   puppet/util/windows
 - Update namespace from Puppet::Util::ADSI to
   Puppet::Util::Windows::ADSI
 - Add module / class definitions for ADSI to util/windows.rb
   to prevent tests from blowing up on non-Windows
 - Moving Puppet.features.microsoft_windows? checks to top of
   user and group provider tests for ADSI
 - Update all dependent code, remove unnecessary references
(PUP-2554) FFI Puppet::Util::ADSI

 - Convert ADSI GetComputerName to FFI
 - Add missing error handling for GetComputerName Win32 function
 - Add test that verifies GetComputerName returns a non-empty string
 - Add FFI MemoryPointer aliases for dwords

Conflicts:
  spec/unit/util/windows/adsi_spec.rb