(Maint) Don't parse nil Facter::Util::Resolution output

Previously, running facter on a system without virt-what would produce:

  Could not retrieve virtual: undefined method `gsub' for nil:NilClass

This commit checks that we have a non-nil output before trying to parse
it.
(Maint) Suppress spec test output

The macosx_spec ensures that an error is raised when parsing invalid
XML, but this causes the following output when running the tests

  Fatal error: error parsing attribute name at :1.
  Fatal error: attributes construct error at :1.
  Fatal error: Couldn't find end of Start Tag bad line 1 at :1.
  Fatal error: Extra content at the end of the document at :1.

This commit suppresses the output written to STDERR. See
LibXML::XML::Error::VERBOSE_HANDLER.
(#20053) Add missing require in ipaddress6 fact

This fixes the error
    Could not retrieve ipaddress6: uninitialized constant Facter::Util::IP
(Maint) Fix environment leakage in loader spec

This removes the stub on Facter when loading facts from the environment. This
would cause the test to fail if the environment had any extra variables named
FACTER_*.
(#20072) Redirect stderr to the correct null device on windows

Previously the virt_what method redirected stderr to /dev/null, which fails on
windows. This commit adds a case for windows where the stderr is redirected to
NUL, the windows null device. It also adds tests to ensure this behavior.
Merge branch '1.7.x'

* 1.7.x:
  (Maint) Fix environment leakage in loader spec
  (#20053) Add missing require in ipaddress6 fact
  (Maint) Suppress spec test output
  (Maint) Don't parse nil Facter::Util::Resolution output

Conflicts:
	spec/unit/util/loader_spec.rb
(#22072) Execute fully resolved virt-what

Previously, we were calling virt-what, which on windows, causes it to
think it might be a shell built-in, which it isn't. And that results in
the warning:

  Using Facter::Util::Resolution.exec with a shell built-in is deprecated
  Most built-ins can be replaced with native ruby commands. If you really
  have to run a built-in, pass "cmd /c your_builtin" as a command.

This commit changes the virt-what helper to first resolve virt-what into a
fully qualified path, which uses ENV['PATH']. On Unix, it also looks in
/sbin and /usr/sbin.
Maint: Colorize spec output on Windows

Previously, running bundle exec rspec spec on Windows output ANSI escape
sequences. This commit requires the win32console gem to colorize the
output.
Merge branch 'ticket/1.7.x/20072_fix_virt_what_redirection' into 1.7.x

* ticket/1.7.x/20072_fix_virt_what_redirection:
  Maint: Colorize spec output on Windows
  (#22072) Execute fully resolved virt-what
  (#20072) Redirect stderr to the correct null device on windows
(#14522) Don't read /proc/self/status on Solaris

/proc/self/status isn't a standard file on Solaris and can't be read as such.
Attempting to read it when using ruby 1.9.3 produces errors such as 'invalid
byte sequence in US-ASCII'. According to
http://www.ruby-forum.com/topic/163804, /proc/self/status is a sparse file with
a map at /proc/self/map to indicate which parts of the file to read. As a
stopgap measure, this commit simply returns false on Solaris, rather than
trying to read the file.
(#14522) Force encoding of data read from /proc/self/status

Without this patch the previous fix for this issue worked well, but was
actually testing and fixing a different problem than described in the
issue.  Reading the /proc/self/status file on Solaris works well,
however the file contents are very different from the Linux platform.
On linux the file contains US-ASCII encoded text which is fully
compatible with our default UTF-8 encoding.  On Solaris, however, the
file is raw data representing the memory space of the process.  This raw
data has no encoding, and as such, causes the invalid byte sequence when
compared with a regular expression.

This patch addresses the problem by forcing the encoding of the string
into UTF-8, removing any invalid characters.  The comparison is not a
problem on MRI versions which do not have `String#encode!`.
Merge branch 'haus-ticket/1.7.x/14522_dont_read_proc_on_solaris' into 1.7.x

* haus-ticket/1.7.x/14522_dont_read_proc_on_solaris:
  (#14522) Force encoding of data read from /proc/self/status
  (#14522) Don't read /proc/self/status on Solaris

closes #421
Merge branch '1.7.x'

* 1.7.x:
  (#14522) Force encoding of data read from /proc/self/status
  (#14522) Don't read /proc/self/status on Solaris
  Maint: Colorize spec output on Windows
  (#22072) Execute fully resolved virt-what
  (#20072) Redirect stderr to the correct null device on windows
Maint: Fix order dependent test failure

Previously, executing the following would fail due to order dependent
test failures:

  rspec spec/unit/util/virtual_spec.rb spec/unit/util/macaddress_spec.rb
  rspec spec/unit/util/virtual_spec.rb spec/unit/util/uptime_spec.rb

This occurs because rspec filters were being used on describe blocks,
but those values are not cleared up between examples.

This commit instead filters the tests based on
Facter::Util::Config.is_windows?

It also removes duplicate expectations on kernel value
Merge remote-tracking branch 'upstream/1.7.x'

* upstream/1.7.x:
  Maint: Fix order dependent test failure