(#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
(#22910) Deprecate networked access to resource

The resource indirection isn't safe to be accessible on the master, and
is not functionality that we want to continue to support for the agent.
Instead, users should use mcollective or similar systems for remote
command execution.
(#22910) Deprecate --host on puppet resource

With the networked resource access deprecated, the --host option also
needs to be deprecated so that users can easily see that it is
deprecated. Instead of using Puppet.deprecation_warning, this uses
simply Puppet.warning so that the user isn't presented with a confusing
code location on the command line. This should be ok since the
throttling of the message shouldn't be needed from the CLI environment.
(#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
(#22703) Force encoding of comment value to ASCII-8BIT

The comment field for user resources can often contain non-ASCII
characters. Unfortunately, Puppet retrieves the existing value
(current_value) as ASCII-8BIT, but strings containing non-ASCII
characters are automatically turned into UTF-8, resulting in a failure
to concatenate the strings in change_to_s, with messages such as the
following in Puppet 3.2.4 with Ruby 1.9.3:

  Error: Could not convert change 'comment' to string: incompatible character encodings: ASCII-8BIT and UTF-8
  Error: Could not convert change 'comment' to string: incompatible character encodings: ASCII-8BIT and UTF-8
  Error: /User[rpinson]: Could not evaluate: Puppet::Util::Log requires a message which is due to the fact that current_value is encoded in ASCII-8BIT, but newvalue is in UTF-8 and not "softly" convertible when reaching change_to_s in property.rb.

In order to allow proper management of non-ASCII characters in the
comment field, this PR forces an ASCII-8BIT encoding on the comment
property value in the type.

Note: trying to force the encoding in Puppet code (using e.g.
inline_template) doesn't solve anything, and patching change_to_s to
force the encoding results in the resource not being idempotent anymore,
since comparison fails (but change_to_s doesn't crash anymore).
(#22703) User comment encoding: Do not munge value in place, use encoding constants