(#21409) Preserve original error when propogating

Previously the original error was lost when some of the error handling
routines dealt with it (such as Puppet::Util.exceptwrap). This allows
the original error to be propogated out along with it.
(#21409) Ensure that create_resources acts the same as a resource decl

The previous implementation of create_resources duplicated most of the
logic of Puppet::Parser::AST::Resource, but had variations which meant
that it didn't actually behave the same. This lead to the possibility
that what should have been equivalent statements in the language did not
always result in the same catalog. This re-implements create_resources
to construct the AST that is needed to create the requested resources
and evaluate the resulting structure. This should only be able to
differ from actual resource declarations in the language if the
constructed AST is wrong.
21760/22005 update preflight to delete old lib dir

In order to install in the top-level site_ruby directory, we need to clean out
any installs in the old site_ruby/1.8 location. We're doing this by setting a
variable in the package:apple task. If it's set, we remove all files there as
well as files in the new location.

While I'm here:
* update erb to strip leading and trailing spaces
* validate critical variables so a script is never generated with dangerous paths
* only target top-level files/dirs in lib, since we're doing rm -RF anyway
(#22206) Add option to disable default schedules
Use Dir.glob(), don't require rubygems or rake, use Dir.chdir as a block
use instance_variable_get instead of eval
(Maint) Remove whitespace errors

A lot of blank lines had picked up extra spaces.
(#21201) Remove thread-safety code

Puppet does not support running in any threaded environments. The thread
safety code that has been added has been, for the most part, haphazard
and not a holistic solution to the threading problem. There are many
areas that are not protected at all and others that were protected in
incomplete ways. The extra code and logic only caused more complication
in the codebase and is removed by this commit.
(#21201) Remove test for thread-safety

The functions test for thread safety, after many runs after having
removed the thread safety code, still did not fail. This removes the
test.
Merge pull request #1766 from zaphod42/issue/master/21409-create_resources-differs-from-real-resource

(#21409) Ensure that create_resources acts the same as a resource decl
Merge master onto stable to prepare for 3.3 release

Merge remote-tracking branch 'origin/master' into stable

* origin/master: (478 commits)
  (Maint) Add docs for #relationship_graph
  (#22205) Reinstate relationship_graph as a factory method
  (#22205) Select manifest ordering for ordering test
  (#22191) Rename cancelled to canceled
  (#22191) Always process internal catalogs
  (#22191) Mark ready, but unevaluated resources, as skipped
  (#22191) Add cancelled resource handler
  (#22205) Extract common Prioritizer code into a superclass
  (#22205) Chose a Prioritizer based on Puppet[:ordering]
  (#22205) Re-introduce old ordering as a Prioritizer
  (#22205) Provide setting to control manifest ordering
  (#22205) Add enum setting type
  (Maint) Restructure requires for settings
  (Maint) Removed commented out settings
  (#22205) Extract class for generating resource priorities
  (22021) Implement (un)install_options for OpenBSD package provider.
  (Maint) Move most graph related code to Puppet::Graph
  (#18508) Ensure that no two resources have the same priority
  (#18508) Handle duplicate generated resources correctly
  (#18508) Ensure eval_generated resources apply at the right time
  ...
(#22250) ensure a failed resource status always has an event

Typically, a Puppet::Resource::Status.failed is set to true
when an event is added whose status is 'failure' (this is done
in Puppet::Resource::Status.add_event).  However, there is also
a case where Puppet::Transaction::ResourceHarness.evaluate
directly sets the status failed field to true.

Generate an event for this latter case, so that report parsers
can rely on an event accompanying any failed resource status.
(packaging) Update PUPPETVERSION for 3.3.0-rc1
Merge branch 'stable'

* stable:
  (packaging) Update PUPPETVERSION for 3.3.0-rc1
(maint) Limit ignore to root doc/ directory

'doc' was ignoring other 'doc' dirs elsewhere in the tree such as
acceptance/test/docs.  This should ensure we only ignore the
<repo-root>/doc directory.
(#22250) refactor previous and add spec tests
Merge pull request #1845 from kylog/issue/22250-reports-inconsistent

(#22250) ensure a failed resource status always has an event
(Maint) Mark AdditionalResourceGenerator as private
(#22229) Ensure generated resources contained

The generated resources were left out in the cold with respect to
containers: they had none at all. This changes that to make sure that
the generated resources (via #generate and #eval_generate) have the same
container as the resource that generated them.
(#22288) Add methods to access all parameters of a type

Without this commit there is no simple way to access all parameters of
a type. There is also no simple way to iterate over them. There is
currently a method that will return a list of all parameters that have a
value assigned, however, they are duplicates of the actual parameters. This
means there is no clear way to perform an operation on all parameters at once
that will have lasting side effects.

This commit adds functionality needed by the solution to ticket
(#22288).This functionality this commit adds includes a method to collect all
parameters that currently have a value assigned. This commit also adds a method
to iterate of the collected parameters that currently have a value. The intention
of these methods is to allow things like post catalog compilation hooks to be possible.