(maint) Correct ssl/puppet_cert_generate_and_autosign test to do what it says it's doing.

Prior to this commit, the test was incorrectly specifying autosign=false
when attempting to test the behavior when autosign is true. This looks
like a simple copy-paste error as the test right above is exactly the
same. This commit correctly specifies the autosign value.
(PUP-1177) allow parsedfile providers to choose a default mode

The ParsedFile provider baseclass and its companion Util::FileType module
employ Tempfile for pre-buffering generated files. If there is no actual
file at the final desination yet, copying the tempfile will preserve its
permissions, which implies a mode of 0600.

This is not desirable for all files managed by ParsedFile providers. Therefor,
the ParsedFile provider baseclass now provides an interface to change this
default mode by overriding a method.
(maint) move the file mode tests to the files spec module

It is helpful to have a simple helper method to match desired file modes
from spec tests.
(PUP-1177) make sure ssh_known_hosts is not created with mode 0600

The default mode for files that a ParsedFile provider newly creates
is 0600. This makes no sense for the ssh_known_hosts file, because it
contains public information that adds to security for all users.
(PUP-1177) update ParsedFile provider unit tests

The constructor for the :flat filetype accepts a second argument now.
This second argument must be taken into account when stubbing specific
invocations.
(PUP-1177) restore :ram FileType compatibility

The :ram filetype, as an alternative to :flat, is often used for spectests
of ParsedFile providers. The providers normally use the :flat type, but through
mocking, are made to use :ram in test context. Since the providers often pass
both supported arguments to the :flat constructor, it must be accepted by the
constructor of the :ram type as well.
(PUP-2079) Add no-op PMT generate template format.

Prior to this commit, the mechanisms available for writing skeletons containing ERB templates
were awkward at best (and broken at worst).

This change adds a new template extension for module skeletons that has the (somewhat counter-
intuitive, when described this way) behavior of performing no alterations to the given template.
In this way, one could place a file like `foo_bar.erb.template` in their module skeleton, and
generated modules would contain a file named `foo_bar.erb` with the exact contents of the
`.template` file.

This will also close pull requests #2468 and #2688.
(PUP-1811) Set regexp match vars on regexp match using in operator
(PUP-1811) Add tests for regexp search in array setting match vars
(PUP-2833) Make all types inherit PAnyType

Some types inherited PAbstractType (to indicate they where not
concrete). This just causes confusion when using the Ruby API
to check if a Type is PAnyType.

This makes all types inherit from PAnyType (which is the only
type inheriting from PAbstractType).
(PUP-2654) Capitalize each segment of a resource type "label"

When a Resource type is stringified it selects the short notation
(e.g. Fee::Foo) over the longer (e.g. Resource[Fee::Foo]), and
when doing so it should output each segment of the FQN with a
capital letter. The current implementation only capitalizes
the initial letter (e.g. Fee::foo::fum).

This fixes the implementation of
TypeCalculator.string_PResourceExpression to capitalize all segments.
(maint) Fix microsoft_windows feature to return false instead of nil.

Fixing Puppet.features.microsoft_windows? to return false instead of nil.
(maint) Remove unnecessary facter stub in compiler_spec.rb.

Removing an unnecessary facter stub.
The stub is incorrect as value does not return a Fact object.
The correct stub is used below.

Also removing redundant require of puppet/rails.
(PUP-2104) Add cfacter setting to enable cfacter implementation.

Adding a --cfacter setting that will replace the facter implementation
with the native facter implementation if the following conditions are
met:

* cfacter is installed
* the version of cfacter is at least 0.2.0 (not yet released).
* facter has not evaluated any facts by the time the setting is set.

To accomplish this last point, certain default setting values needed to
be delay-evaluated as they relied on facts. Therefore a :default
for a setting now accepts a Proc and calls the Proc only once when the
default value is needed.
Merge pull request #2811 from peterhuene/alternative/facter

(PUP-2104) Add cfacter setting to enable cfacter implementation.
(maint) Fix Pattern / Variant Type assignability

This fix corrects Pattern.assignable?(Variant) which was not
correctly supported in the type calculator. (It gave up if t2
was not a String or an Enum). Now, if t2 is a Variant,
the check recurses to the types described by the enum.
(maint) Fix Enum / Variant assignability

The type calculator did not correctly compute assignability
for an Enum when assigning a Variant type. Now, all variants
are checked if they are assignable to the enum type.
Merge pull request #2789 from hlindberg/PUP-1811_in-set-match-vars

(PUP-1811) Make 'in' set match vars when regexp is used to match
(maint) Fix problem with Enum subset not matching Enum

This corrects a problem where Enum[a] was not assignable to
Enum[a,b], since it is a subset, it should be assignable.
(maint) Add the ability to inject calling scope into function.

The InteralFunction API now has the ability to "inject" and weave
the calling scope into the dispatched arguments by calling
the method scope_param() when building the dispatcher.