SELinux spec test fix for ubuntu

On systems with a /proc/self/mountinfo but without an selinuxfs
filesystem, the "should return an SELinux policy version" test would fail.
This patch stubs it so this file doesn't exist, and the selinux mount point
is correctly calculated.

Signed-off-by: Matthaus Litteken <matthaus@puppetlabs.com>
(#2344) VMware version parsing fix

VMware detection should not be file base. This will cause workstation
to be incorrectly dectected as server. This implements the fix
suggested, using 'vmware -v' to grab the correct vmware version.
It also fixed the spec tests to correctly expect the vmware -v
exec.

Signed-off-by: Matthaus Litteken <matthaus@puppetlabs.com>
Merge pull request #49 from haus/selinux_spec_fix

SELinux spec test fix for ubuntu
Merge pull request #48 from haus/virtual_vmware_fix

(#2344) VMware version parsing fix
Change count to length for compatibility

In physicalprocessorcount, .length should be used instead of
.count as .count is not supported on ruby <= 1.8.6. This was
causing test failures on ruby 1.8.5.

Signed-off-by: Matthaus Litteken <matthaus@puppetlabs.com>
Merge pull request #50 from haus/physical_processor_fix

Change count to length for compatibility
Updated CHANGELOG for 1.6.1rc2
(#9457) Fix logic for domain fact so hostname, then dnsdomainname and finally resolv.conf is used.

A recent commit changed the logic for how this fall-through logic was
working. I've fixed the logic and added more coverage to pick up on this.
Merge remote-tracking branch 'kbarber/tickets/master/9457-domain_fact_broken'
(#2747) Fix detection of xen0 vs xenu in Xen 3.2.

Check for xsd_kva for dom0, rather than independent_wallclock (which is present on both dom0 and domu). Work around /proc/xen/capabilities, which is sometimes not world-readable.
Stub out OS and HW model to avoid test failures.
Only stub vmware -v (don't expect it) since it needn't be invoked if we already identified Xen or something else.
(#8491) Prevent repeated loading of fact files

Fact loading could recurse indefinitely if a fact file attempted to call
Fact#value on a fact that was not yet defined before the current file.
If Fact#value was called outside of a setcode block, it would be
evaluated at load time and the loader would rescan the fact path from
the beginning and would reenter the current file, continuing until the
stack was full. This is a byproduct of the more exhaustive fact
searching introduced in 2255abee.

The resolution for this is to track the files that have been loaded and
ignore subsequent attempts to load them, emulating the behavior of
Kernel.require. However, since facts can be legitimately refreshed
over the life of a ruby process using Facter, Facter.clear will reset
the list of loaded files by destroying the fact collection, and
subsequently the loader.

Currently puppet agent will reload all facts preceeding a run, so normal
puppet agent behavior will remain as expected. However, the facter facts
terminus manually loads fact files itself and bypasses facter's search
path and standard loading mechanism. While it will benefit from the
recursion protection, it currently does not have a way to reset the
loaded file list.
Merge pull request #57 from adrienthebo/ticket/master/8491-remove_multiple_fact_loading

(#8491) Prevent repeated loading of fact files
Updated CHANGELOG for 1.6.1rc3
(#9295) Initial detection of Hyper-V hypervisor

pulled out from video card matching and dmidecode

Future plans include grabbing version info and seeing if module
is loaded.

dmidecode info:
System Information
        Manufacturer: Microsoft Corporation
        Product Name: Virtual Machine
        Version: 7.0
        Serial Number: ....-....-....-....-....-....-.. (removed)
        UUID: ........-....-....-....-............ (removed)
        Wake-up Type: Power Switch
(#9295) Added spec tests for Hyper-V detection
Merge branch 'feature/1.6.x/9295-add_virtual_hyperv_detection' into 1.6.x

Reviewed-by: Adrien Thebo <adrien@puppetlabs.com>
(#9593) Require rubygems to handle json output for ruby 1.8.7.
Merge remote-tracking branch 'kbarber/ticket/9593-json_output' into 1.6.x

Reviewed-by: Adrien Thebo <adrien@puppetlabs.com>
Merge pull request #54 from mkincaid/ticket/next/2747

(#2747) Fix detection of xen0 vs xenu in Xen 3.2.