(#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.
(Maint) Pin windows gems to match what we ship

The win32-dir gem has a dependency on ffi, which was recently updated to
1.9.3 but does not provide a precompiled version. As a result, the gem will
attempt to compile native extensions, which will fail on our spec boxes
(since the dev kit is purposefully not installed).

This commit pins ffi to 1.9.0, updates win32-dir and windows-pr to the
version that we ship with, and pins each gem to an exact version matching:

https://github.com/puppetlabs/puppet-win32-ruby/tree/1.9.3/ruby/lib/ruby/gems/1.9.1/gems
(Maint) Unpend tests for certs on windows

The recent changes to how locks are handled made these previously
failing tests start working on windows!
(Maint) Properly mark test as unsuitable for windows

fork() doesn't exist on windows. I had tried to confine the test to not
run there, but did it wrong. This should fix it.
Merge remote-tracking branch 'upstream/stable'

* upstream/stable:
  (Maint) Pin windows gems to match what we ship
(#693) Update file handling to work on Solaris

It appears that solaris has different file semantics from OSX and Linux.

  * flock() is allowed on the same file from the same process. On linux
    this ends up with a block of the second invocation of flock().
  * flock() is not allowed on a file that is opened for read-only.
  * fopen() with "a" causes a read to occur at the end of the file. On
    linux the read is at the beginning of the file.
(Maint) Reformat and remove debugging message

The previous commit contained bad formatting since I wrote it on a
machine with a stock vim (tabs and wrong indentation). This also removes
a forgotten debugging message in a spec.
(#9546) Fix spec tests against facter 1.6.

Previously the facter_spec tests called directly into
Puppet::Nodes::Facts::Facter.setup_external_facts and
ran regardless of whether the facter version supports
external_facts_dirs=.

Note that facter 1.7 had external_facts_dir so this test passed,
but didn't have external_facts_dirs? and didn't support external
facts plugin sync, so really shouldn't have supported this test.
Facter 1.6 didn't have either so exposed this mismatch.

This change:
a) marks setup_external_facts as private, which was the intent
b) changes the affected tests to use the indirector's find method,
   which is intended to be public
c) changes the affected tests to be confined by Puppet.features.external_facts?
Merge pull request #1922 from joshcooper/ticket/master/21241-priority

(#21241) Allow process priority to be specified
(#21241) Use correct constant for low priority

Needs to be BELOW_NORMAL_PRIORITY_CLASS.