(Maint) Convert to new block expects
(#22471) Rescue errors specific to the YAML parser

The different yaml parsers, which are used in different versions of
ruby, end up throwing incompatible errors when loading data. The
Psych::SyntaxError that is thrown by the ruby 1.9 Psych parser is not
catchable by a generic `rescue => detail` block. Instead it needs to
explicitly call out the errors that need to be rescued.

This duplicates the error logic in Puppet::Indirector::Yaml.
(Maint) Simplify code

There was some unused code, overly complicated conditionals, and a use
of YAML that didn't use the built in writing to a stream.
(Maint) Stop asserting nothingness

Assertions that something doesn't raise an error, are not normally very
useful. In the case of these tests they only served to obscure the test
that was actually being done.
(#22471) Extract YAML interaction into shared code

The extra logic that is needed to interact with both Psych and Syck was
duplicated in the Puppet::Util::Storage and Puppet::Indirector::Yaml
classes. This pulls out a common module that wraps YAML and provides
consistent, and safe, semantics for using YAML for reading and writing.

This also removes the check ofr ::ArgumentError in addition to
::StandardError because it seems that ::ArgumentError is a sublcass of
::StandardError.
(#22471) Remove duplication by using Puppet::Util::Yaml

The new Puppet::Util::Yaml provides a common way of dealing with YAML
differences across ruby versions. This changes to two places in the
codebase that cared about these differences to use this common code.
(#22384) Log 404 and 406 responses at info

When the specific exception classes for HTTP control flow were
introduced, they ended up changing the logging from info to notice.
Notice is a much more severe level, which doesn't warrant having simple
file not found errors showing up at it. This changes the level back to
info.
(maint) Don't use subject in parsedfile spec
(#19994) Ensure that failed ParsedFile operations are marked flushed

Since ParsedFile maintains a global queue of records to be flushed and
attempts to flush all outstanding operations each time a resource is flushed,
any failed operations would be retried for each resource. This lead to
unrelated resources failing.
Merge pull request #1898 from pcarlisle/ticket/19994-parsedfile-flush-failed

Ensure failed ParsedFile operations are not retried for other resources
Merge pull request #1895 from zaphod42/issue/stable/22384-excessive-logging

(#22384) Log 404 and 406 responses at info
(#21975) Don't monkey patch Object#instance_variables

We were monkey patching Object#instance_variables to return symbols instead of
strings on ruby 1.8 which broke the use of SOAP. The patch was only used to
make it easier to do set operations when determining attributes to serialize
in zaml. This narrows the behavior of converting to symbols into the zaml code
so we don't have to override Object#instance_variables.
(#22471) Finish removing duplication of yaml exceptions

Remove a bit of code wasn't cleaned up but was no longer used.
Merge branch 'issue/stable/22471-corrupt-state-yaml' into stable

* issue/stable/22471-corrupt-state-yaml:
  (#22471) Finish removing duplication of yaml exceptions
  (#22471) Remove duplication by using Puppet::Util::Yaml
  (#22471) Extract YAML interaction into shared code
  (Maint) Stop asserting nothingness
  (Maint) Simplify code
  (#22471) Rescue errors specific to the YAML parser
  (Maint) Convert to new block expects
Merge remote-tracking branch 'patrick/ticket/21975-monkeying-around' into stable

* patrick/ticket/21975-monkeying-around:
  (#21975) Don't monkey patch Object#instance_variables