(#22622) External output defaults to empty string

 - Previously, if an external fact generated empty output, parse would
   be called with a nil, which cannot have each_line called on it, and
   would cause Facter to crash.  This sets a reasonable default for
   external command output to the empty string
Merge pull request #567 from Iristyle/ticket/stable/22622-external-facts-without-output-cause-failures

(#22622) External output defaults to empty string
(Maint) Execute test on all agents using beaker's DSL method

Previously, the test was only executing on the first agent host, and it
attempted to run facter directly, which fails on windows when executing
via ssh, because facter is a .bat file, not an executable.

This commit updates the test to run on all agent hosts, and it uses
beaker's built-in DSL method for executing facter, which ultimately
executes:

    cmd /c facter --puppet test_fact1

It also uses beaker's method for passing environment variables to the
command being executed.
Merge remote-tracking branch 'upstream/stable'

* upstream/stable:
  (Maint) Execute test on all agents using beaker's DSL method
  (#22622) External output defaults to empty string

Previously, if Facter::Util::Resolution.exec returned nil, the
KeyValuePairOutputFormat.parse method was never called, which is what
returns an empty hash. This was causing a test to fail.

Paired-with: Ethan J. Brown <ethan@puppetlabs.com>
Adding vCloud node configs
Setup script to install Git on vCloud hosts
(maint) Add acceptance setup steps from puppet-acceptance

This is so that we can run the acceptance tests with Beaker, which
expects each project to manage all of its own setup process.
(#23135) Support deploying to Solaris and Windows vcloud machines

Previously, the acceptance suite could only target linux boxen. This
commit adds beaker configs for solaris and windows, and also makes the
setup steps more cross-platform-friendly.
(maint) Recognize `fc` as a type of redhat platform in acceptance setup

The beaker config file for fedora 18 in this project has a platform
starting with `fc` instead of `fedora`.
(maint) convert fc to fedora in acceptance configs

Beaker cares about the platform for package installation, and does not
recognize `fc` as a valid platform. The expected string is `fedora`
use the pooling api
(Maint) Allow acceptance tests to be run on preserved windows hosts

Previously, running acceptance tests on a preserved windows host would
fail, because the puppet-win32-ruby directory already existed from the
previous run, and git clone will report a fatal error.

This commit uses beaker's method for cloning a repo. The method handles
things like only cloning if necessary, resetting remotes, and cleaning
existing workspaces.

Cherry-pick of 326b7ac106fe4630ff59ec1da716207c0d67a065 from puppet
(Maint) Remove puppet specific setup steps

These steps are not needed when executing facter acceptance.
(Maint) Change canonize to canonicalize

To canonize is to officially declare a dead person to be a saint,
which isn't what we want.
(Maint) Override the `parse_results` method

Previously, the Base parser subclasses were not consistent in which
parse method they overrode. The `parse` method wraps the `parse_results`
method with exception handling. Subclasses that could potentially raise
exceptions should override `parse_results` instead.

Note the NothingParser is an exception, since it just returns nil.
(#23368) Simplify how parser is stubbed out

Previously, the methods for stubbing out a parser were repeated across
tests. This makes it more DRY.
(#23368) Quote scripts that contain spaces

The Facter::Util::Resolution.exec method expects that commands with
spaces are quoted. On 2003, external facts are typically under
C:\Documents and Settings\All Users\Application Data. As a result,
facter would always fail to execute external executable facts on 2003.

This is not an issue on 2008 and up, because external facts are
typically located under C:\ProgramData.

This is not an issue for powershell scripts, because we pass the quoted
name of the script to powershell.

This is not an issue for text based external facts, because `File.read`
do not require paths with spaces to be quoted (since its not a command
and possibly arguments, or just a command with spaces).

This commit adds a `quote` method to the ScriptParser so that we quote
the script if it has spaces.
Merge branch 'ticket/stable/23368-external-scripts-broken-2003' into stable

* ticket/stable/23368-external-scripts-broken-2003:
  (#23368) Quote scripts that contain spaces
  (#23368) Simplify how parser is stubbed out
  (Maint) Override the `parse_results` method
Merge branch 'stable'

* stable:
  (#23368) Quote scripts that contain spaces
  (#23368) Simplify how parser is stubbed out
  (Maint) Override the `parse_results` method
  (Maint) Change canonize to canonicalize
  (Maint) Remove puppet specific setup steps
  (Maint) Allow acceptance tests to be run on preserved windows hosts
  use the pooling api
  (maint) convert fc to fedora in acceptance configs
  (maint) Recognize `fc` as a type of redhat platform in acceptance setup
  (#23135) Support deploying to Solaris and Windows vcloud machines
  (maint) Add acceptance setup steps from puppet-acceptance
  Setup script to install Git on vCloud hosts
  Adding vCloud node configs

Conflicts:
	acceptance/setup/00_EnvSetup.rb
	lib/facter/util/parser.rb
updates for Google Compute Engine, v1