(maint) Add support for Optional in TypeParser and TypeFactory
(maint) Make handling of undef more strict as a type

instace? should not return true for undef for all types. This
means that [undef] =~ Array[Integer] is false. The Data type
was relaxed to still accept undef/nil everywhere except as a key in
a hash.
(maint) Make injector accept undef/nil when doing type checking

Since types are now restrictive, the injector must tolerate undef
as instance (i.e. since it means 'not found').
(maint) Fix several issues with type system implementation

The type system implementation and tests had several flaws.
* Tests did not call expect/should and did not assert
* Undef handled wrong wrt. instance_of
* String allowed parameterization with string values (useless). Can now
  instead be parameterized with a size constraint
* Collection, Array, and Hash can now be parameterized with size
  constraint.
* Data type made lenient allowing undef in constructs
(maint) Require json for logstash test

Removal of the hiera2 bindings code exposed the fact that the test for
logstash logging doesn't require JSON even though it uses it. This adds
a line to require JSON so that it is available when the test runs.
(PUP-672) Add nested context capabilities

A major problem in puppet is keeping track of contextual information.
The Puppet::Indirector::Request attempts to do this, but it isn't able
to pass that information between indirector requests. This adds a
global context system, where once a value is set it cannot be changed,
but a subcontext can be created.
(maint) Log exception using log_exception

The master application was not using Puppet.log_exception to log out any
errors that might occur during --compile. This meant that there was no
backtrace information available to diagnose the problem.
(PUP-672) Add defaults for context lookups

Before it wasn't possible to get a value from the context that might not
have the requested binding. This adds the ability to provide a default
in the case where there is no finding for the name.
(PUP-672) Track trusted information using the context

This pulls apart the indirector request and the trusted information. The
trusted information is stored in the Puppet::Context and overridden by
the remote request handler to allow the injection of various elements of
trusted information. The reason to separate it from the indirector
request is because the indirector requests are hard to control, as they
are contstructed from hashes of information passed around and
manipulated. This should provide a more straightforward mechanism for
managing this kind of "contextual" information.
(PUP-798) E4ParserAdapter watches files through Environment

Instead of passing known_resource_types, if present, pass the given
environment, and provide a delegate method to watch_file on Environment.
Clears up a few layers of type checking and does not require the adapter
to know anything about known_resource_types for the purpose of watching
files, but a valid environment must be passed.
(maint) Uniform use of TypeCollectionHelper in Scope

Scope includes TypeCollectionHelper which provides an accessor for
known_resource_types.  This patch just fixes a direct reference to
environment.known_resource_types to instead use the delegate method the
same as other known_resource_types calls in the Scope class.
(PUP-672) Provide certificate extensions as trusted data

This extends the trusted information that is exposed to the system and
manifests to include the certificate extensions that are part of the
certificate provided by the agent. Only the custom extensions that are
part of the puppet extension arc are included.
(PUP-672) Updated test to match trusted data structure

During implementation of the trusted extensions the layout of the
trusted hash changed a little bit. This updates the acceptance test to
reflect that and also changes it to be much more straightforward to
read for the expected structure.
(maint) cron: Make the munge method for the command property more readable

The removal of leading and trailing spaces in cron commands was
performed using a perlism instead of just using String#strip.
Do that instead.
(PUP-1051) Add rspec test to verify fix
Merge pull request #2194 from hlindberg/maint_undef-not-correctly-handled-in-type-calculator

(maint) undef not correctly handled in type calculator
(maint) Add support for creating the PType (metatype) in type factory

This method was missing.
(maint) Add support for Type[T] in access operator

This makes it possible to parameterize a Type from the Puppet Language.
e.g. support:

    Integer =~ Type[Integer]  # true
(maint) Add test of Type[T] access operator.
(maint) Add support for Type[T] in TypeParser

This makes it possible to go from String form to Type.