(Maint) Remove loader test dependence on ENV

Previously the test for checking that FACTER_* environment variables get
turned into facts was sensitive to the actual environment variables with
which the test ran. This caused incorrect test failures if there was
such an environment variable during the test run. This changes the
loader to be able to be given the environment hash that it should look
at and changes the tests to stop relying on the environment for testing.
(Maint) Remove unneeded mocking

There were mocks for something called 'settings', which were never used.
This removes them.
Document Facter API with YARD

This adds YARD documentation with `@api public` tags to the public API for
facter. This is a first pass, so it's probably missing some things that should
be considered public.
Use the API to test resolution weight
Merge branch 'yard'

* yard:
  Use the API to test resolution weight
  Document Facter API with YARD
(#17925) Fix ec2_userdata: 404 Not Found Error

Without this patch applied Facter returns the following error message to
the user when no user-data is present in the instance metadata server
when Facter is running on an instance in Amazon AWS EC2.

    $ facter ec2_userdata
    Could not retrieve ec2_userdata: 404 Not Found

This patch addresses the problem by handling the exception produced from
the HTTP 404 Not Found error.  In this circumstance of no user-data
being present, the fact value is not set.

With this patch applied the behavior is as follows:

    $ userdata=$(facter ec2_userdata); echo "userdata: [${userdata}]"
    userdata: []

And the error is not silently dropped with debugging turned on:

    $ facter --debug ec2_userdata
    No user-data present at http://169.254.169.254/latest/user-data/: server responded with 404 Not Found
    value for ec2_userdata is still nil
Merge branch 'bug/1.6.x/17925_fix_ec2_userdata' into 1.6.x

* bug/1.6.x/17925_fix_ec2_userdata:
  (#17925) Fix ec2_userdata: 404 Not Found Error
Merge branch '1.6.x' into 1.7.x

* 1.6.x:
  (#17925) Fix ec2_userdata: 404 Not Found Error
Merge branch '1.7.x' into 2.x

* 1.7.x:
  (#17925) Fix ec2_userdata: 404 Not Found Error
Merge branch '2.x'

* 2.x:
  (#17925) Fix ec2_userdata: 404 Not Found Error
(#17612) Add Google Compute Engine support to virtual fact

Without this patch the virtual fact does not return a value that
specifically identifies Google Compute Engine.  This is a problem
because configuration decisions may depend on if the resources being
configured exist within GCE or not.

This patch addresses the problem by changing the behavior of the
`virtual` fact to return the value `gce` when running in Google Compute
Engine's cloud.

This patch uses the Google recommended and documented way to detect if
we are running on a Google Compute Engine:
https://developers.google.com/compute/docs/instances#dmi
(#17612) Follow Google docs to populate virtual => gce

Without this patch applied Facter uses lspci to determine if the system
is running in the Google Compute Engine virtual environment.  This is a
problem because Google recommends parsing the output of
/sys/firmware/dmi/entries/1-0/raw as per [Detecting if You Are Running
in Google Compute
Engine](https://developers.google.com/compute/docs/instances#dmi).
`lspci` may be unreliable over time.

This patch addresses the problem by adding a higher weight fact that
scans `/sys/firmware/dmi/entries/1-0/raw` as recommended by Google.  The
fact is confined to Linux and disables itself if
`/sys/firmware/dmi/entries/1-0/raw` does not exist in the filesystem.
Merge branch 'feature/1.7.x/17612_gce_cloud_support' into 1.7.x

* feature/1.7.x/17612_gce_cloud_support:
  (#17612) Follow Google docs to populate virtual => gce
  (#17612) Add Google Compute Engine support to virtual fact
Merge branch '1.7.x' into 2.x

* 1.7.x:
  (#17612) Follow Google docs to populate virtual => gce
  (#17612) Add Google Compute Engine support to virtual fact
Merge branch '2.x'

* 2.x:
  (#17612) Follow Google docs to populate virtual => gce
  (#17612) Add Google Compute Engine support to virtual fact
Merge branch 'maint/master/remove-test-dependence-on-env'

* maint/master/remove-test-dependence-on-env:
  (Maint) Remove unneeded mocking
  (Maint) Remove loader test dependence on ENV