(#7244) Consolidate autosign setting

Previous implementation split out a new autosign_command setting for the
custom policy executable, which required a confusing autosign=false
setting.

This commit removes the autosign_command setting and instead uses the
autosign setting for all modes (true/false, autosign.conf or custom
policy executable).  Internally we refactor to distinguish between
autosign.conf or an executable by the executable bit.

We are removing the mode of the autosign setting, because it was
stripping all executables of their executable bit.  This only removes
the guarantee that group and other do not have write permissions.
However, these are the default permissions for a regular file on most
systems, so nothing should be lost.
(Maint) Introduce partial implementation of an In-Memory file

Quite often in tests we want to work with a "file", but not actually
deal with the file system. We usually do that by mocking out all sorts
of things on File and FileUtils and Dir and various other places. Now
that we have Puppet::FileSystem::File (and maybe at some point in the
future we'll have Puppet::FileSystem::Store to represent the actual
storage system, what we normally call the filesystem itself) we can
create different kinds of files.

This adds Puppet::FileSystem::MemoryFile, which, so far, only partially
implements the methods on Puppet::FileSystem::File and addes 3 methods
to Puppet::FileSystem::File to allow us to easily create a view onto the
filesystem: overlay, remember, forget.
(#7244) Fix up tests after refactors of the Autosign system

The refactoring of the Autosign system changed its interaction with the
filesyste. This fixes up the tests to work with the new interactions and
hopefully be more robust to future changes.
Merge pull request #2083 from zaphod42/jpartlow-feature/7244/refactor-autosign-setting

(#7244) Consolidate autosign setting
(#7243) Add dns_alt_names with hostname to autosign test

Lack of hostname as a dns_alt_name was producing master certs which
could not be looked up by bare hostname (as used by Beaker) in the
Jenkins environment.
Merge branch 'feature/7243/fix-autosign-command-acceptance-subjectaltnames'

* feature/7243/fix-autosign-command-acceptance-subjectaltnames:
  (#7243) Add dns_alt_names with hostname to autosign test
Define Puppet cert attribute OIDs

This commit defines an initial set of OIDs for private use within Puppet. The
defined OIDs are focused toward identifying node information that is
embedded in a node certificate.
Merge pull request #2085 from adrienthebo/feature/puppet-custom-oids

Define Puppet cert attribute OIDs
(#22363) Add [] method to PPatternType to create regexp.

The future evaluator makes it possible to reference types and perform
operations on them. This implements an operation that allows a regular
expression to be created from a string. Thus, String interpolation can
be performed when constructing a regular expression.

Example:
  $name = 'Fred'
  $a ~= Pattern["[a-z]*:${name}"]
  $b = Pattern['.*']
(#22363) Extend type system with PHostClassType and PResourceType

This extends the type system with support for host classes and
resources. The primary reason for adding these to the type system is
that the evaluator needs to expose something that represents references
to types. In the 3.x these were simply qualified
references/names/strings that only resolved to a type when passed as
values to certain methods in the runtime.
(#22363) Add type parameter to PType

This adds a type parameter to PType (the type of types). Without this it
is not possible to infer types (everything reduces to PType).

As an example, the evaluator want to assert that an Array only contains
Resources (e.g. when evaluating x -> y). In the language, it is not
possible to directly manipulate instances of resources (they are in the
catalog, only the handles can be passed around and be manipulated).

The idea is that instead of using strings, or qualified references or
stringified 'File[foo]' as references, these are instead represented as
types! This centrailizes the handling of what a "resource reference" is.

This change thus infers(T) to be Type[T]. As an example the array
[PIntegerType, PStringType] is infered to have the type
Array[Type[Literal]].
(#22363) Add abstract type PCatalogEntryType

An abstract type for things that are catalog types (host classes and
resources) is needed to be able to assert things like
Array[CatalogEntry].
(#22363) Remove super type from PHostClassType

It was a bad idea. The super_class has to be resolved at runtime after
having loaded the class. (The same way it is done for Ruby types).

This commit just removes the ability to declare a PHostClass with a
super type.
(#22363) Add [] type operation to subtypes of PCatalogType

The [] operator is defined for PHostClassType and PResourceType to
allow unspecific types to be used as templates for creating specific
type references.

i.e. to support the expressions
File['a'], Class['a']
more naturally by applying [] to the LHS base type.
(#22363) Add test of capability to create array of types using []

This checks the feature that class and resource references support
the shorthand notation X[a,b,c] to produce [X[a], X[b], X[c]].

This applies only to subtypes of PCatalogType. It is not possible to
create an Array of other parameterized types.
(#22454) Fix partial shadowing of match variables.

Scope only performed partial shadowing of match variables. This was
caused by a search of missing numeric variables in outer scopes.

This commit changes that by making the most nested match scope
authoritative wrt numerical variables. It also changes the scope to use
individually stored variables to simply looking them up in the match
data that is used to construct the match scope.

The scope_spec is changed to test for this. Some other tests changes as
a consequence of the internal refactor.
(maint) Remove unused ephemeral?(name) from scope.

The method was only used from scope_spec.rb
(#22363) Add "future evaluator"

This commit contains the initial work on a new evaluator. It operates
on the output of the future parser.
(#22363) Add variables tests and fix evaluation implementation.

This adds testing of variables, assignment and += assignment in various
forms. The + operator has been broken out to a separate method to be
used by both + and +=.

Corrects calls in runtime support (3x must have string variables names).
Corrects problems in the rspec helper w.r.t top/local scope and making
sure there is a topscope (to lookup ::x namespaced variables).
(#22363) Remove defunct testing of type operations

The functionality was moved to streamline the type model. The operations
are now implemented (and tested) as part of AccessExpression (i.e. it is
a language feature to apply [] operator on types, not an intrinsic
capability of a type).