(PUP-2399) Add mailalias acceptance tests

Add basic acceptance tests for mailalias type. This adds acceptance
tests for create, query, modify, and destroy.

The tests assume that the mailalias type manages the default
/etc/aliases text file as well as updating the binary database
that the aliases file is the source for.
(PUP-2399) Remove testing of newaliases

As per PUP-1143, the mailalias type does not manage the state of
the aliases.db file via 'newaliases', 'sendmail -bi', or any other
mechanism due to compatibility issues. Since this is the case,
all testing of the aliases.db file have been removed from the
mailaliases tests in this commit.
(PUP-2747) Add support for multiple profilers

This commit makes a slight modification to the profiling system,
such that we can register multiple profilers at the same time.

This allows callers to register their own profiler without
worrying about collisions with profilers that might have
been registered by other parts of the code.
(maint) Refactor shared example from parser/compiler_spec

Previously this spec's tests were a shared_example that had been shared
between runs with parser=current and parser=future.  The future compiler
tests were moved out into
spec/integration/parser/future_compiler_spec.rb in 7a6a7d8.  This maint
fix just removes the unused rspec construction of shared_examples_for
from around the specs in parser/compiler_spec, since they are only being
run against the current parser now.
(PUP-2756) Fix test of future parser evaluation of empty string

An empty string is no longer undef when parser is future, and will
evaluate as true in a conditional test. This commit fixes a test that
was failing this check for the future parser. This, and several like
it, was an acceptance test which was just compiling a simple manifest
with some conditional logic to test evaluation of conditionals. Since
acceptance tests are expensive, I've pulled them back into the
integration specs.

The actual test being fixed is
acceptance/tests/apply/conditionals/should_evaluate_empty.rb which is
now the two 'evaluates empty string as <false|true>' specs in the new
spec/integration/parser/conditionals_spec.rb
(PUP-514) Add support for optionally typed parameters.

This adds support for typed parameters in the ast model, the
grammar, and factory.

At this point, the information is only remembered, but not acted on.
(PUP-514) Add test for parsing of typed parameters

This updates the tree dumper to dump parsed type information
for parameters.
(PUP-514) Add validation and test of 'captures-last' parameters

This validates that only functions may have captures-last, and
that it may only be placed last amon the parameters.
(PUP-514) Add test for validation of 'captures rest' in lambdas
(PUP-514) Support last_captures_rest for lambdas

This adds the ability to define a lambda with "last-captures-rest"
semantics and to call it.
As a consequence, when a lambda with last captures rest semantics is
given to one of the iterative functions, a serving size of two
parameters is assumed
(PUP-514) Add support for opt-in typing of define/class parameters

This makes define and class parameters support optionally typed
parameters when using the future parser. The type expressions
are evaluated by the Pops Bridge when parameters are transformed t 3x.
The 3x parameters are not aware of type information (they are encoded as
arrays), and changes to all the logic that deals with parameters turned
on to not be a good design. The resource type and resource is instead
made aware of the opt-in types via a separate param-name to type map
that it applies in the validation step that was already performed.
(maint) Improve comment and formatting in test.
(PUP-514) Change warning to debug, and add validation of type expr

This changes the warning issued on the code path when a resource type
is required in order to do deserialization (apply phase). When this
happens on the server side (or during apply), the full source is
available, and the type in "known resource types" is loaded code that
may have typed parameters. This second time, no validation can and will
not take place because it is happening where there is no top scope
available. (This is fine, and should use result in a debug output).

This also fixes a couple of typos.
(PUP-514) Fix issue with case when inferring a Resource type

When the type calculator was inferring a Resource type, it assigned
an upper case name to the type_name in the resulting PResource type.
It should have assigned a lower case name.
(PUP-514) Change Puppet::Resource inferece to be Type[Resource]

This changes the inference of a Puppet::Resource to be
Type[Resource], instead of Resource. This because a Puppet::Resource
plays the same role as PResourceType - it is a reference to either
all instances of a resource type, or to one specific resource type.
(PUP-514) Accept Resource, or Type[Resource] when forming relationship

This makes forming relationships possible using either a
Types::PResourceType (or hostclass type) and a
PType[Types::PResourceType].

This was changed to allow Puppet::Resource to have the same semantics
as a PResourceType. (Currently 3x expressions produces instances
of PResourceType as the result of a resource expression, this is not
transformed back to a PResourceType, instead it is inferred to be
Type[Reource].
(maint) Remove pending tests for parsing functions in puppet
(PUP-514) Make Puppet::Resource behave as PResourceType wrt access

This makes Puppet::Resource behave as a PResourceType when using
the access operator; to detail a type with a title, or to
access a parameter of a typed/titled resource.

This is done to make differences between 3x and future planned catalog
builder transparent. 4x uses PResourceType as a reference to a
resource (handle/future ref), where 3x uses instances of
Puppet::Resource for both the instance, and references to it.
(PUP-514) Improve/add tests for typed parameters define/class
(PUP-514) Improve testing of typed parameters

This improves testing of typed parameters, and the ivolved
tests in general. One test moved from being an evaluation test
(it only tested parsing).

Iterative function testing changed to use better matchers.