(PUP-3227) Address man page ownship conflicts

Prior to this commit, upgrading from puppet=2.7.23-1~deb7u3 and
puppetmaster=2.7.23-1~deb7u3 to puppet=3.7.0.29-1puppetlabs1 and
puppetmaster=3.7.0.29-1puppetlabs1 fails. I believe this problem is due
to how Debian chose to package puppet-common, which owns
`/usr/share/man/man8/puppet-master.8.gz`.

This commit adds in a `Conflicts:` to the puppetmaster and
puppetmaster-common packages to make sure that we can successfully
upgrade from these older package versions. However, if a user has
puppetmaster and puppet older than 3.3.0 installed on a machine, and
only upgrades puppetmaster, this will uninstall the puppet package from
the system.
(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-3366 Fix issues with string/enum type assignable calculations

There were errors in the calculation of string/enum calculation.
Basically Enum == String, if String is size constrained then
Enum < String. This fixes this calculation.

There were no tests for this, they are now added.
(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-3365) Change 3x deep map of undef to only do surface map

This changes the mapping of arguments to 3x function calls to not
map undef to empty strings except at the surface level. Other mappings
are still done as they are required for frozen strings, and values
having a type that is not supported by the 3x functions.
(PUP-3258) node exec indirector: default to environment, not its name

Nodes can be classified through a local executable that prints YAML with
a node specification. This is enabled through the node_terminus=exec option.
Since PUP-2519, this setting would break `puppet apply`. Trying to apply
any manifest would lead to Puppet applying the default environment's site
manifest instead.

The reason for this is that the node terminus will include the current
environment's name in the node lookup result. This in turn makes Puppet
look up the environment per name. This is not the desired behavior, because
Application::Apply performs the lookup and further operations with a localized
environment that overrides the site manifest.

Solved by including the current environment object in the returned node object
instead of its name.
(maint) reduce repitition in Application::Apply integration spec
(PUP-3308) Remove deprecation warning about cron purge change

This commit removes deprecation warnings for the :purge attribute
of the cron resource. Previously, when 'purge' was set to true
for unmanaged cron resources, Puppet would fire off a warning
about the 'purge' option becoming more aggressive in future versions.

This update is part of the code removal effort for Puppet 4.
(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.
(PUP-2350) Disallow non-string file modes

In Puppet 4.0 integers will be parsed more strictly, which means that
file modes like `644` will be octal 1204. The alternative to this is to
force file modes to be strings where they cannot be interpreted
incorrectly. PUP-2349 deprecated non-string modes; this commit removes
support for them entirely.
(docs) Move user-facing docs for reinstall_on_refresh into user-facing doc string

These docs, intended for users, were in a comment where only developers would
ever see them. This commit moves them into place so they'll appear in the type
reference, and restores the original developer-facing comment for the parameter.
(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-2998): Make log_level settable in puppet.conf

Added a call hook to the `log_level` setting so that this setting can be
defined in `puppet.conf` in addtion to being passed as a command line flag.
(PUP-3315) Update build_defaults for MSI builder

This moves the sha1 to include the recent changes to the MSI that add more
clarification on FQDN of Puppet master.
Merge branch 'stable'

* stable:
  (PUP-3315) Update build_defaults for MSI builder
(PUP-3277) Fix acceptance Gemfile logic for choosing gemsource

Since there were no parentheses around the trinary, if GEM_SOURCE was
set, it would be immediately ||'d with OUTSIDE_PUPPETLABS, causing
rubygems.org to be selected as the path instead of GEM_SOURCE.  Broke
this bad logic up to make it explicit that GEM_SOURCE takes precedence,
and we only worry about a default if it is not set, then choosing
between two options based on whether the user has set the
OUTSIDE_PUPPETLABS flag.
Merge branch 'issue/master/pup-3277-fix-gemfile'
(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=`.