(PUP-1362) (PUP-1775) Use yum check-updates for latest yum packages

Early versions of the yum package provider used `yum list available` to
determine the latest version of packages that were `ensure => latest`.
However the versions of yum available around that time changed the
output formatting of yum, which meant that the parsing code would break
on a regular basis (#836).

Commit 8722e439 resolved this by using the yum python bindings to
interact with yum. This required shipping a python helper script to
provide the interface between Puppet and the python libraries. However
this opened up a host of other issues ranging from what version of
Python is symlinked to '/usr/bin/python', how the yum database is
locked, and so on (PUP-1362, #11380, #16623). In addition changes to
yumhelper.py were very hard to test or reason about since it doesn't
neatly plug into our existing tests.

This commit removes yumhelper.py and replaces the update checks by
calling `yum check-update`. The output format of this command has not
changed since CentOS 4 and works all the way up to RedHat 7 so we should
be able to rely on this for a while.
(maint) Remove GC bug workaround for Ruby < 1.8.7

Commit bd5dc649 added a workaround for a Ruby GC bug that was present in
1.8.5, 1.8.6, and partially fixed but still residual in 1.8.7. Since
we're dropping Ruby 1.8 support entirely we can now remove the
workarounds.
(PUP-1106) Unschedule refreshes on skipped resources

If a given resource is being skipped (e.g. has failed dependencies, is
unscheduled, untagged, etc) that resource should not trigger any
additional behavior. However a resource could be skipped and still have
events trigger behavior. This commit changes the event processing logic
to only process events for resources that should be applied and dequeues
events on resources that should not be applied.
(maint) Use correct data type when unscheduling events

Commit 9d59f204 added the ability to dequeue events on a given resource,
but it did so by setting the value of the target callbacks to an empty
hash. However the value of target callbacks is an array, so if events
were re-queued for a given resource we would get an error like so:

    {}.concat(%w{one two three})
    NoMethodError: undefined method `concat' for {}:Hash

Currently we can't requeue events after dequeuing events, but if this
changes then this code is very incorrect.

This commit fixes the event reset to behave as expected.
(PUP-3312) Remove deprecated methods from the Puppet module

This commit removes the `parse_config` and
`initialize_settings_for_run_mode` class methods from the Puppet
module. This commit is part of the code removal effort for Puppet 4.
(PUP-3569) Do not require rubygems in Rakefile for modules
(PUP-3272) Remove vendored safe_yaml and related patches

safe_yaml is no longer needed since YAML on the network is no longer
supported (slow because of safe_yaml, and unsecure without it).

This also removes the early and eager loading of safe_yaml that
affects startup time of all puppet applications even if they do not use
YAML.
(PUP-3272) Drop (unused) puppet-load

This removes the puppet-load as it relies on using removed formats.
(PUP-3272) Drop support :legacy_query_parameter_serialization

This backwards compatible setting caused resource parameters for queries
to be replaced with arrays containing yaml. This was only needed for
agents <= 3.2 and upgrade policy is that agents must be updated to
latest 3x before moving to 4x.
(PUP-3272) Remove YAML on the network

This removes b64_zlib_yaml, but keeps yaml as a format.
An attempt is made to change yaml to pson for networking - do not know
if that has been achieved.

3 tests are failing.
(PUP-3272) Remove vendored load of safe_yaml
(PUP-3272) Change deprecation warning for YAML on nw to errors

This changes the deprecation warnings about YAML use on the network
to errors. As a consequence tests are updated to reflect the change.
(PUP-3272) Fix broken test

The test was broken as it changed how a body war rendered; rather
than using the body, it always rendered either data or the body as pson
- the intention was to use the raw body.
(PUP-3772) Remove commented out base64 encoded yaml network format

The base64 encoded yaml network format should have been removed.
It was only commented out.
(PUP-3272) Remove safe-yaml parameters fom YAML load

These parameters have no effect when regular YAML is used.
(PUP-3272) Change Status yaml deserialization to support psych

This changes deserialization of a Status instance to use
a custom initialization (based on params hash). The implementation
is in a PsychSupport module to make it more visible and easier to add to
other classes needed the same support.

Since this change is not compatible with 1.8.7, the report_spec test
that depends on this functionality is restricted to not run on Ruby
1.8.7.
(PUP-3272) Remove special treatment of YAML encoded parameters

When it was allowed to pass YAML on the network it was also allowed to
pass parameters that were YAML encoded. The 3x logic had deprecation
warnings in place for these places.

Now in 4x, when YAML is no longer supported, the request parameters are
simply always strings. If someone yaml encodes data and sets it in a
parameter this has no special meaning - it is just a string that happens
to contain yaml (e.g. "--- \n 'foo'\n").

This means that it is now ok to have parameters that look like YAML but
it is not - this could cause problems earlier.
(PUP-3272) Simplify logic where yaml param was special case

Also remove dead comment.
(maint) Change phrasing of error message about Yaml not supported

This changes message from "are not supported" to "is not supported"
(PUP-3272) Remove commented out code