Move mode management into the providers
Previously, the logic for getting and setting file mode was
implemented in the type's retrieve and sync methods of the mode
property itself.
This commit adds a validate method to the type (previously validating
was being done in munge), and adds 'mode' and 'mode=' methods to the
POSIX and Windows file providers. The POSIX provider does what it did
before, and the Windows provider contains the same broken mode-logic
that it did before. Actually translating file permissions, e.g. 0755,
to Windows will be done in a later commit.
This commit also fixes tests on Windows where the file mode was being
set by Puppet::Util::Windows::Security, but read back using File.stat,
which doesn't round-trip. Now the test uses the security module for
both setting and getting.
Disabled symlink tests on Windows, which are not supported.