Merge remote-tracking branch 'hlindberg/pup-798_watch-files-must-be-called' into maint/master/test-future-prs

* hlindberg/pup-798_watch-files-must-be-called:
  (PUP-798) Add call to watch_files to ensure reparsing
(maint) Add Optional Type

To be able to more easily deal with undef (not matched by default
except by Data) the convenience type Optional is introduced with
the same semantics as Variant[T, Undef] (i.e. undef/nil) is accepted
instead of real type).
(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-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.
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.
(maint) Add support for Ruby['classname'] in access operator.

There were also several problems since the existing behavior
did an inference of the type parameter thus always arriving
at Ruby[String]. From the Puppet Language, the parameter is
always a String containing the class name.
(maint) Add test for Ruby['classname']
(maint) Add support for Ruby['classname'] in type parser

This makes it possible to convert from Ruby type in string form
to a RubyType.
(maint) Add support for Collection[<size constraint>] to type parser

The type parser testd that Collection[from,to] resulted in error
while this is supported as an access operation. Should have been
the same in both places.

This allows a Collection in string form to have type parameters for
the size constraint.
(maint) Correct assignable? for Type without type parameter

The expression Type[Integer] =~ Type should produce true but did not
since it only considered the parameterized case.
(maint) Add test for Type[Type[x]] instance? operations

There were no testing of meta type matching when there is meta
type regression (the type of the type of the...)