(#21241) Add a priority setting

This commit add a `:priority` type of setting that maps generic priority
labels to operating system specific priorities, e.g. normal priority is
0 on posix, but 32 on Windows.

If the value is specified as an integer, then it is passed as is, so
that specific priority levels can be specified.

This commit also adds the `priority` setting to the main section of
puppet's configuration.
(#21241) Set process priority if one is specified

This commit adds a Puppet::Util::Limits module for specifying process
priority, and mixes the module into Puppet::Util::CommandLine. Since
the CommandLine is the application entry point for puppet it seemed
sensible to have it set the process priority there, and to have it done
as early as possible.

Another option would have been to set the priority in the base
Application, after the application-specific settings have been
initialized. But this would mean you couldn't set the process priority
when puppet executes an ExternalSubcommand-based application.

As it stands now, it's not possible to have different priorities for
different sections, e.g. agent vs master, in puppet's configuration
file.
(#22660) Revert Fedora 17+ agent service name to "puppet" from "puppetagent".

Due to pull request 1166, in the fedora 17+ transition to systemd, the puppet
agent service was inadvertantly renamed from "puppet" to "puppetagent".

- in specfile, move systemd service and unit file names back to "puppet" from erroneous "puppetagent"
- Add symlink to puppetagent unit file for compatibility with current bug
- Alter package removal actions to deactivate and stop both service names
- rename unit file in source tree to correspond with this
(maint) Remove shebangs from *.rb files in lib
(maint) Remove executable permission from *.rb files in lib
(#22858) note official ruby 2.0 support in README
(#9546) Make pluginsync copy external facts to client

Pluginsync will now look in moduledir/facts/ for external facts and
copy them to the client under :pluginfactdest (default: $vardir/facts)
(#9546) Use $vardir/external_facts for storing external facts

Puppet loads local ruby facts from "$vardir/lib/facter#{File::PATH_SEPARATOR}$vardir/facts"
so we do not want to store our external facts in this directory.  I
could find no place where $vardir/facts is populated by plugin sync
or any other mechanism so this location must be for facts that do not
belong to a Puppet module and are installed locally on the destination
system.
(#9546) Load external fact directories into facter config
(#9546) Refactoring external fact source and dest to fact.d

The original implementation of this was going to use facts/ as the
source and destination directory.  It turns out the destination
directory facts/ is in use by some outdated code.  So the source and
dest will be switched to facts.d/ which also keeps the naming scheme
consistent with the existing external facts directory
/etc/facter/facts.d
(#9546) Add spec tests for external fact pluginsync
(#9546) Added external fact plugin sync support to plugin face
(#9546) Added feature detection support for external facts

External fact support in puppet core is dependent on facter commit
https://github.com/puppetlabs/facter/commit/6f19eeeef1c5c8e9cc84c44599e03a5c06a30abc
so we need to detect if the installed version of facter is capable
before executing the external fact code
(#9546) Removing PATH_SEPERATOR from pluginfactdest

This is not needed since only one direcrtory will be used for storing
and retrieving pluginsyncd external facts
(#9546) Retrieve module external fact dir from Puppet::Module

Instead of hard coding the external fact directory for modules and
globbing the directories, it would be accurate to have the
Puppet::Module type perform the lookup logic for external fact
directories.   The facts indirector just needs to make sure those
directories get added to the external fact lookup.
(#9546) Update facter specs to support request.environment.modules
(#22180) Provide doc --mode rdoc parsing under Ruby 1.9

Puppet's RDoc parser was only compatible with RDoc 1, which is part of
Ruby 1.8.  RDoc's internals and API change between version 1 and 2+.

This commit refactors the rdoc/parser into an
rdoc/parser/puppet_parser_core.rb module which is included by two
different rdoc1 and rdoc2 parser classes.

It allows generation in either Ruby 1.8 or Ruby 1.9, but the HTML
renderer under Ruby 1.9 is stll the default, hence the format is not
optimal, and some elements, notable plugins and nodes, are not present.
(#22180) Make function, type, fact and node appear in rdoc2 output

The driver for Rdoc1 uses CodeObject classes with specialized
data structures for function, type ("plugins"), facts and nodes. The
standard generators for RDoc2 does not know about these and thus
no output was generated.

This commit changes this for RDoc2 by adding the missing parts using
standard Ruby CodeObject elements (module, method, etc.)

Note that the puppet specific parser is very picky in what it considers
to be a function, type, fact, etc. In fact, it was so picky that it
would almost never find certain elements. This commit also relaxes the
parsing to allow all functions that have :arity specified to be found.

The order in which the parsed object are intitialized is changed (all
details set before adding it to the container). This since the RDoc2
variant creates a different object based on the given data
(documentation is driven from this copy, not the original).
(#22180) Add integration test for puppet doc --mode rdoc

We were lacking any comprehensive testing of the interaction between
puppet doc and rdoc.  This integration test checks either the rdoc1 or
rdoc2 output (depending on which version of rdoc is present on the
system) for all of the basic module constructs we are documenting:
modules, classes, defined types, nodes, and plugin facts, types and
functions.  It tests both site manifests and modules.
(#22956) Use a set to store tags

Tags were being stored in an array, which is inefficient as the number of tags
grows. This commit changes Puppet::Util::Tagging to store tags in a set. A new
class is added, Puppet::Util::TagSet, which subclasses the built in set while
allowing it to be compatible with the old serialization format.