Allow passing extra options to the execute

In order to allow the macports execution to have the normally not
allowed HOME environment variable the Provider.commands() method has
been extended to allow specifying the options to pass through to the
execute call
Added doc of the command parameter
Simple complete command wrapper for providers

Will be used for keeping track of commands registered in providers.
Puppet::Provider constructs Command objects

Delegation to a command object to handle executing a command.
Deprecated make_command_methods

This is a private method that should not be exposed.
Delegate all commands to Puppet::Provider::Command

Command execution for providers is now all coerced into
Puppet::Provider::Command.
Documented commands
Unit test for Puppet::Provider dsl
Added unit tests for Provider command DSL

Testing the command method creation, invocation of the command and
effect on the suitability of the provider.
Added tests around suitability of provider
Moved Puppet::Provider::Command

It had been created in the wrong place. Moving to the right location
Allow definition of commands via a dsl

Allows definition of single commands and specifying more specific things
about how they should be executed (such as environment variables to have
set)
Cleanup of internals

Moved around parameters to Puppet::Provider::Command and cleaned up the
interface to the CommandDefiner sub-language of the Puppet::Provider so
that using it is a little simpler to read.
Deprecation points to has_command for substitute
(#13435) Change default signing digest algorithm

Change the default digest algorithm away from MD5

This commit is one step along the way to FIPS 140-2 compliance (#8120).
In a FIPS 140-2 environment, MD5 is not available. Older versions of
Ruby (1.8.7, 1.9.2) will SIGABRT when trying to use MD5 because they
don't properly check the return code from openssl.

Because the fingerprints between agent and master aren't
machine-verified and `puppet cert list --digest <digest>` supports any
of the digests, this commit is backwards and forwards compatibile.

Later portions of #8120 will make the default digest algorithm
configurable.
(#13898) Fail Face when option collides w/ setting

Change Puppet::Interface::Option to prohibit options on Faces that have
the same name as an existing Puppet setting.
Move functionality of Puppet::Util::Setting::StringSetting.setbycli to
Puppet::Util::Settings and deprecate usage of StringSetting.setbycli
because StringSetting provides metadata for the definition of setting,
whereas Setting contains both the value and the origin of the value,
whether :cli, :memory, :application_defaults, etc.
Change ca application and certificate Face to properly handle all
permutations of --dns_alt_names (Puppet setting) and --dns-alt-names
(Face option).
Remove "documentation only" options of :modulepath and :environment from
module Face.

Prior to this commit, Faces could declare options that collided with
existing Puppet settings, which has caused unexpected behavior for the
Face.  This commit explicitly prohibits the Face from declaring an
option which is already a Puppet setting.  This is a potentially
breaking change for externally developed Faces.
(#13898) Fail Face when option collides w/ setting

Remove commented out options.
Removed topscope being overridden by node

This seems to have been an unsuccessful attempt at merging top and node
scope.
Use Win32 API atomic replace in `replace_file`

The changes to enable Windows support in `replace_file` were not actually
complete, and it didn't work when the file didn't exist - because of
limitations of the emulation done on our side, rather than anything else.

Windows has a bunch of quirks, and Ruby doesn't actually abstract over the
underlying platform a great deal.  We can use the Windows API ReplaceFile, and
MoveFileEx, to achieve the desired behaviour though.

This adds even more conditional code inside the `replace_file` method to
handle multiple platforms - but it really isn't very clean.  Better to get
this working now, then refactor, though.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
Make `binwrite` emulation work on Windows.

So, it turns out that Ruby on Windows is pretty damn awesome, and that to
successfully sysopen a file, then use it as an IO, you need to write this:

    IO.new(IO::sysopen(filename, mode), mode) {|io| ... }

...yes, indeed, you need to repeat the mode, and pass the sysopen mode - which
is completely incompatible with the normal open.  It works when you pass a
file descriptor from sysopen, though, and gets Ruby convinced to use it right.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>