(#19447) Puppet::FileSystem::File Windows symlink

 - Windows symlink support has been added to exist?, symlink, symlink?,
   readlink, stat, and lstat.  This overrides any usage of Ruby File or
   FileTest classes which are completely borked on Windows.
 - :manages_symlinks feature of the file provider is enabled with a
   check against Puppet.features.manages_symlinks? which checks for the
   existence of the CreateSymbolicLink call in kernel32.dll
 - FFI wrappers for Win32 API calls CreateSymbolicLink, CreateFile,
   GetFileAttributes, DeviceIoControl and CloseHandle added to
   windows/file
   NOTE: The DeviceIoControl method of resolving symlinks was used
   instead of GetFinalPathNameByHandle, which is known to misbehave
   with UNC paths
 - Any tests against :manages_symlinks feature are automatically turned
   on for Windows, increasing test count by approximately 42 new tests
 - Removed a few symlink tests that were confined to any OS other than
   Windows since they must now be adjusted to run on Windows versions
   that we know support symlinks
 - Updated symlink documentation based on ileUtils.symlink behavior
(#19447) Windows symlink check process token

 - Windows symlink support is enabled not only by the existence
   of the CreateSymbolicLink API call, but also by checking the
   current process token for the SeCreateSymbolicLinkPrivilege
 - Inspired by http://stackoverflow.com/a/2129589
(#19447) check Puppet.features.manages_symlinks?

 - Replace calls to the specific :file provider with the global
   Puppet.features call
(#19447) Rewrite symlink tests for file type

 - These old tests haven't been running since 2010 due to how RSpec was
 setup, and were incorrect
 - Rewrite to let Puppet manage file content, and clean up for better
 readability / maintainability
Maint: Re-word doc string for file type's ensure property

This commit makes the Windows situation with symlinks a bit more clear, and
hopefully clarifies the available values in general.
(#19447) Check for symlink permission only if we try to create one

Previously, puppet would always issue a symlink privilege warning,
even when not managing symlinks.

This commit changes it to only check for the permission if we are
about to create a symlink, and also uses `Puppet.warning` instead of
`Kernel.warn`.
(#19447) Fall back to stat if we don't support symlinks

Previously, when managing a file with a source parameter pointing to a
local file, the file resource and file serving code would try to call
`Puppet::FileSystem::File.lstat`, without knowing if the path referred
to a link or not. In other words, the method can be called on things
other than a link, and shouldn't fail when symlinks aren't supported,
i.e. windows 2003.

We could change all of the callers to check if the path is a link and
then only call `lstat`, but that seemed more risky. This commit just
changes the windows `lstat` method to fall back to stat in the 2003
case.
(#19447) Fully qualify access to ruby `File`

This commit just ensures that we call the ruby File methods, as
opposed to Puppet::FileSystem::File, which is at the same "level" as
this class. It also explicitly requires the windows util code to
ensure there aren't load order issues.
(#19447) Rescue when symlink privilege does not exist

Previously, the process_privilege_symlink? would raise on 2003 instead
of returning FALSE.

Now we rescue the ERROR_NO_SUCH_PRIVILEGE when trying to lookup
SeCreateSymbolicLinkPrivilege.
(#19447) Skip symlink test if provider doesn't support it

Confine the tests to when the provider supports symlinks.

Note how the shared examples are invoked if the windows host supports
symlinks. Putting the check inside the "metadata collector symlinks"
shared example causes the "on Windows" outer example groups before each
block to be executed on non-windows platforms.
Merge branch 'ticket/master/19447-windows-symlinks'

* ticket/master/19447-windows-symlinks:
  (#19447) Skip symlink test if provider doesn't support it
  (#19447) Rescue when symlink privilege does not exist
  (#19447) Fully qualify access to ruby `File`
  (#19447) Fall back to stat if we don't support symlinks
  (#19447) Check for symlink permission only if we try to create one
  Maint: Re-word doc string for file type's ensure property
  (#19447) Rewrite symlink tests for file type
  (#19447) check Puppet.features.manages_symlinks?
  (#19447) Windows symlink check process token
  (#19447) Puppet::FileSystem::File Windows symlink

Closes GH-1997
Merge branch 'master' of https://github.com/puppetlabs/puppet