(#22356) Add api documentation for reports

This adds a draft of documentation for the reports "REST" api.

This version is a DRAFT with lots of questions.
(#22356) Add json schemas for the report objects
(#22356) add spec test and vanilla (useless) schema
(#22356) Add json schemas for the event object
(#22356) Add report API json-schema, validation, and documentation.

This adds documentation and a complete json-schema (draft 4) for the
report API endpoint. The documentation includes an example.

A report test validates the schema itself as well as a generated report
to ensure that the schema describes what is generated.
(#22356) Change POST to PUT, fix Ruby 1.8.7 and windows issue

1.8.7 does not have File.absolute_path which broke the test. Method not
needed since jsonschema for report is no "all in one file".

The schema gem does not work on windows; tests cannot run there.

HTTP PUT is the method used for the report API, not POST.
(#22356) Remove deprecated yaml from the description

This also updates the link to where the documentation is (will be).
(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.
(#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) 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.
(#22471) Finish removing duplication of yaml exceptions

Remove a bit of code wasn't cleaned up but was no longer used.
(#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.
(Maint) TestHelper already clears global state

Previously, the specs were attempting to clear settings and storage
global state before/after each test, but this logic is now handled by
Puppet::Test::TestHelper, since specs often forget to do so, and leak
global state across specs.
(Maint) Don't keep Tempfile open while specs are running

Previously, the specs were creating a Tempfile instance in a before
block, writing to the file, but keeping the handle open, until the
after each block ran. This was done to ensure the Tempfile wasn't
deleted while the test was running.

Also the test for `File.rename` behavior would fail on Windows, because
a file cannot be renamed while any open handles to the file remain.

This commit changes the tests to use the PuppetSpec::Files methods for
generating a unique, temporary, and non-existent filename, and ensures
that any file/dir created during the test will be deleted, even if the
test fails during the run.