(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-2831) Make Puppet work with RGen 0.7.0

This updates the Gemfile to use RGen 0.7.0 (optionally).
In RGen 0.7.0 containment now works as specified, if something is
contained more than once, it moves to the last container that contains
it (by removing it as contained from all other containers). This caused
problems in the Function API where the block default Callable type was
reused for all signatures (and thus moved). There were also problems in
tests where the same type instances was contained in multiple locations.

This fixes these to use distinct instances.
(maint) Remove dead code
(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-2794) Change Callable to mean "can be called with"

It is more meaningful to check that a Callable can be called with
certain types (exact or more generic) than to check the reverse.

This alters the meaning of Callable assignability so that a more generic
Callable is accepted. While this seems counterintuitive from the
perspective of the type system, it is the constraint that is expected as
the constraint being expressed means "Must be callable with arguments of
these types", and a more generic callable is just that.

The current implementation got that wrong, and will actually accept
callables that can in fact not be called.

This also alters the assert_type function that declared that it would
call a given block with Any, Any, when in fact it will call with
Type, Type.

Note, that a function that after this delares that it calls
Callable[Any] will enforce that the given callable is Any. If the intent
is to accept any callable, the type should be given as just Callable.
(PUP-2794) Add an (internal) type called Unit and use in Callable

This adds a type named Unit, that is an "undef of sort" in that
it is assignable to anything, and anything can be assigned to it.

This type is not exposed in the Puppet Language, and it is only
used in Callables to describe that there is no type requirement on
a parameter. (For cases where reflection of a given lambda is
performed etc. or where the error raised when calling a block
is an acceptable solution).
(PUP-2869) Puppet should support HTTP proxy authentication

Without this patch it is not possible to use the Puppet Module
Tool (PMT) with an authenticated proxy.
Many enterprises utilise the services of authenticated proxies for
Internet access. Current code is able to utilise a proxy, but does
not consider credentials for authenticated proxies.
This patch uses the credentials from either the environment settings
for HTTP_PROXY or http_proxy, or the corresponding values in the
puppet.conf file.  The patch allows for http_proxy_user and
http_proxy_password to supplement the current http_proxy_host and
http_proxy_port variables within the puppet.conf.
(PUP-1281) Don't use win32console if ruby v2

Some of this work was done with PUP-2777 (support bundler workflow). That limits
win32console down to being installed/depended upon only for ruby 1.x. This builds
on top of that to only setup functions for colorizing output when using Ruby 1.x
on Windows.
(PUP-2794) Add support for Optional and Variant as Callable

This adds support for a callable block to be specified using
Optional or Variant, as long as any actual type is a Callable.

I.e. in the Function API, it is possible to write:

  required_block_param 'Variant[Callable[1,1], Callable[2,2]]', :block

If the function will invoke the block with either exactly one or
exactly two parameters (and when no type is specified, the type is the
internal Unit (don't care).
(PUP-2794) Change function each to dispatch based on block arity

This changes the implementation of the each function to use different
dispatchers depending on the arity of the given block. This means that
the included module for asserted_serving_size is no longer needed.
(PUP-500) Translate acceptance tests to spec

These tests have nothing to do with the full application stack and are
only checking that the semantics of collections are correct. This
removes this acceptance test in favor of the existing integration spec
tests, which run about 100 times faster and many times more reliably.
(PUP-500) Test realize for realz

The realize() spec tests didn't really do much since they mocked out so
close to the function itself. This calls it in a manner that puts
resources in the catalog and checks that they are there.

The accpetance tests for the realize function are no longer needed.
(PUP-2794) Change function filter to use dispatch for block arity

This changes the function filter to use the dispatchers instead
of having a special arity check.
(PUP-2866) Read UID_MIN from login.defs instead of hardcoding value.

This change reads UID_MIN from /etc/login.defs, if present, for the
minimum non-system user id instead of simply hardcoding a value.  If the
file isn't present or UID_MIN isn't specified, we fall back to 1000 for
BSD family operating systems and 500 for all other operating systems.
Merge pull request #2679 from nwolfe/maint/master/correct-ssl-cert-generate-autosign-test

(maint) Correct ssl/puppet_cert_generate_and_autosign test to do what it...