(#14288) gem provider should tolerate bad lines.

Previously, when the output of the gem command contained a line that didn't
match it was returned as `nil` - but the rest of the provider didn't handle
that value at all!

That led to any mismatch causing various failures to dereference `nil` as a
hash, and general failure.

This fixes this to behave significantly better by just omitting that entry in
the result, returning only the expected content.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
(#13341) Add wrapped exceptions

Puppet::Error can now take an original exception as an argument. It had some
functionality for reporting errors in parsed files which I didn't think
belonged in our base error class. I moved it out into a module and created
ParserError and ResourceError for the cases that use it.
(#13341) Log nested exceptions
Merge pull request #735 from daniel-pittman/bug/2.7.x/14288-gem-provider-fails-on-bad-input

Bug/2.7.x/14288 gem provider fails on bad input
(#14348) Hiera is the default data binding terminus

This patch makes Hiera the default data binding terminus. Users have the
option of "turning it off" by setting `data_binding_terminus` in
puppet.conf to "none":

    # puppet.conf
    [main]
      data_binding_terminus = "none"

This patch includes updated specs.
Merge pull request #743 from kelseyhightower/ticket/master/14348_hiera_should_be_the_default_data_binding_terminus

(#14348) Hiera is the default data binding terminus
Don't use features to check for color in logging

The ansicolor feature was causing infinite recursion when it failed to load,
because it's used in logging and features tried to log when it failed to load.
Since logging should be usable at nearly any point in the system's life, it's
best to not depend on features at all.
Add Puppet::Util::Platform to abstract platform checks

This is different from the checks done in features, because sometimes we need
to check the platform before features are initialized.
Merge pull request #744 from pcarlisle/maint/2.7.x/ansicolor-recursion

fix ansicolor recursion
Merge branch '2.7.x'

* 2.7.x:
  Add Puppet::Util::Platform to abstract platform checks
  Don't use features to check for color in logging
  (#14288) gem provider should tolerate bad lines.

Conflicts:
	lib/puppet/provider/package/gem.rb
	lib/puppet/util.rb
Fix a stub of ansicolor that I missed
Merge pull request #745 from pcarlisle/maint/2.7.x/ansicolor_log_spec

Fix a stub of ansicolor that I missed
(#13858) Use current environment when loading types

When loading a type we should pass in the current environment. This will make
the autoloader use the correct modulepath. Without this it will fail to find
the type unless a local pluginsync has already occurred on the master.
Merge pull request #746 from pcarlisle/ticket/master/13858-types-in-environments

(#13858) Use current environment when loading types
Merge branch '2.7.x'

* 2.7.x:
  Fix a stub of ansicolor that I missed
Fix windows acceptance failures (mostly related to tmpfile paths)
Merge pull request #747 from cprice-puppet/cleanup/master/windows-tmpfile-acceptance-failures

Fix windows acceptance failures (mostly related to tmpfile paths)
Merge pull request #741 from pcarlisle/ticket/master/13341-nested-exceptions

(#13341) nested exceptions
(#14391) Fix inaccurate message from Hiera data lookups

When the Hiera gem is missing the error message now reads:

"Hiera terminus not supported without hiera library"
Merge pull request #752 from kelseyhightower/master

(#14391) Fix inaccurate message from Hiera data lookups