(PUP-3322) Add debugging to appdmg provider

I was trying to install Scratch[1] using boxen[2]. The appdmg isn’t in
the expected format, so this failed. I had to poke around a bit to
understand why that was happening. This change captures that knowledge.

[1] http://scratch.mit.edu/scratch_1.4/
[2] https://boxen.github.com/
(PUP-3355) Remove PSON document_type

This commit removes the encapsulation in the PSON serialization format.
Puppet only did this when using PSON on certain endpoints, other formats
like YAML or MsgPack never did this.

This is backwards compatible with older Puppet versions as they throw
away the info if it is there. But it is backwards incompatible for other
consumers of the PSON APIs.
(PUP-3355) Remove Puppet::Util::Pson

Remove the now unused Puppet::Util::Pson class.
(PUP-3244) ENC ignores missing directory environments

When using an ENC, if an environment that didn't exist was defined for a
node puppet would place the node into the production environment instead
of raising an error to alert the user that the environment that had been
requested did not exist.

This commit changes the behaviour when an environment is defined in an
ENC but does not actually exist. Instead of placing the node into the
production environment a Puppet::Environments::EnvironmentNotFound error
is raised.
(PUP-3244) Acceptance Tests for Nonexistent Environments

Added acceptance tests to test if an error is raised if an ENC specifies
a nonexistent environment for a node.
(maint) Correct Certificate Factory documentation

The existing certificate factory documentation incorrectly indicated
that it was responsible for actually signing certificates, which it is
not. In addition it specified a parameter as a raw
OpenSSL::X509::Request which it is actually the wrapped
Puppet::SSL::CertificateRequest.
(PUP-3244) Validate Environment Before Setting

Before this commit the environment validation was happening for the Exec
terminus instead of on the node object itself. This fix should help all
node objects from having invalid environments when its environment is
set using `Puppet::Node#environment=`.
(PUP-3352) Remove `zlib` setting

Previously, puppet had a `zlib` setting to control whether to use zlib
compression when connecting to the forge or when using `b64_zlib_yaml`
as a network serialization format.

This commit removes the `zlib` setting, and instead, if ruby supports
the `zlib` library, then we will accept compressed content, e.g. when
downloading modules from the forge.

The b64_zlib_yaml format is being removed in Puppet 4, so that part
doesn't matter.

The `zlib` setting defaulted to false, so there shouldn't be any
behavior changes other than you can no longer set the property to
false.
(PUP-3352) Always accept compressed content from the master

Previously, a puppet agent would not use compression when downloading
catalogs and file contents. Compression could be enabled via the
`http_compression` setting, though it defaulted to false.

This commit removes the `http_compression` setting. If the agent ruby
supports zlib, then the agent will add an Accept-Encoding header
specifying that it will accept compress content.

If the agent ruby doesn't support zlib, then the agent will not set
the header, and it will behave like it used to.

Note that not all HTTP servers support compression, e.g. webrick, or are
configured to serve compressed content, e.g. passenger. So in order for
the agent to receive compressed content, the agent must accept it, and
the server must be configured to send it.
(maint) Write forge HTTP debug output to stderr

The forge has a different code path for creating Net::HTTP connections,
so it did not abide by the `http_debug` setting.

This commit changes the module tool so that if `http_debug` is true,
that it writes HTTP debug output to $stderr
(PUP-3393) Minor typo fix in relationship_spec.rb

There were a couple of typos relating to ALL_EVENTS in
relationship_spec.rb.
(PUP-2995) Move custom oid mapping file management to application/master.rb

* As suggested by @adrienthebo, custom oid management was moved to application/*.
* Custom oid management is only involved if `trusted_node_data` is activated.
(PUP-3295) Remove method obsolete since < 0.25
(PUP-3244) Add Puppet::Environment::Directories#get! method

This new function will return the directory environment or raise an
error if a directory environment does not exist. This gets rid of the
need to check if environments exist across the codebase before
continuing for the areas where we need.
(PUP-2995) Change custom OID format and apply code advices.

* As suggested by @ffrank, custom OID file format was changed to use Hash structure.
* Apply code modifications suggested by @ferventcoder.
(PUP-3433) Don't store autoload instances

Autoloader instances were being stored in the Autoload class instance,
but no code actually used the stored values. We can remove all of that
logic.
(PUP-3433) Remove method proxying methods

Why write a 3 line method when you can write a 12 line metaprogramming
method?
(PUP-3433) Remove invocations of Autoload with explicit wrap

In Kernel.load, the wrap argument defaults to false and it was never
possible to set it to true.
(PUP-3433) Tear out dead wrap code

In the class instance `@wrap` could never be true, and in instances
`@wrap` was never used.
(PUP-3276) Remove deprecated methods from Puppet::Util::Windows::*

This commit removes deprecated methods from several Windows utility
modules. Removed methods include:

* `Puppet::Util::Windows::ADSI.sid_for_account`
* `Puppet::Util::Windows::ADSI::Group#add_members`
* `Puppet::Util::Windows::ADSI::Group#remove_members`
* `Puppet::Util::Windows::File.get_file_attributes`
* `Puppet::Util::Windows::Security.get_attributes`
* `Puppet::Util::Windows::Security.add_attributes`
* `Puppet::Util::Windows::Security.remove_attributes`
* `Puppet::Util::Windows::Security.set_attributes`
* `Puppet::Util::Windows::Security.with_process_token`
* `Puppet::Util::Windows::Security.name_to_sid`
* `Puppet::Util::Windows::Security.name_to_sid_object`
* `Puppet::Util::Windows::Security.octet_string_to_sid_object`
* `Puppet::Util::Windows::Security.sid_to_name`
* `Puppet::Util::Windows::Security.sid_ptr_to_string`
* `Puppet::Util::Windows::Security.string_to_sid_ptr`
* `Puppet::Util::Windows::Security.valid_sid?`

This commit is part of the code removal effort for Puppet 4.