(maint) Add optional_parameter_count method to Closure

Add a method to return number of optional parameters on
Puppet::Pops::Evaluator::Closure just like Puppet::Parser::AST::Lambda
has.
(PUP-1551) Use environmentpath in can_enumerate_environments test

Forgot to update the puppet.conf environmentdir setting to
environmentpath. Also change assert_not_match to assert_no_match call
in environmentpath test, as the later is the correct call. Not entirely
certain why this wasn't failing before.
Merge branch 'issue/master/pup-1551-fix-enumerate-env-test'

* issue/master/pup-1551-fix-enumerate-env-test:
  (PUP-1551) Use environmentpath in can_enumerate_environments test
(PUP-753) Benchmark puppet compiling w/many modules

This sets up a scenario in which we are benchmarking the puppet compiler
with a large number of modules, but very simple manifests. The generated
modules have 2 manifests each an public and an internal. The site.pp for
the environment simply includes all of the modules' public classes. The
public classes in turn include their own internal class. The internal
class then places a single "notify" resource in the catalog.

This also ends up laying down a general structure for benchmark
scenarios. Each scenario has support files under `bencmarks/<name of
scenario>` and has a rake namespace under the `benchmark` namespace.
Each namespace should have at least tasks for `generate` and `run`.
(PUP-753) Profile the many_modules benchmark scenario

This adds a new rake task "benchmark:many_modules:profile" that will run
a single case of the many_modules benchmark and profile it using
ruby-prof. The profile data is written to a file in the PWD that can
then be viewed using kcachegrind (or qcachegrind on OSX).
(maint) Pass Facter.search arrays instead of strings

The implementation of Facter.search expects `*args` while Puppet was
defaulting to a colon separated string. This isn't a valid path but
until Facter commit 6c6c394 warnings were almost always squelched which
prevented this from being exposed. This commit ensures that we split up
our (semi)colon delimited paths into an array and passes them to Facter
in the manner that it expects.
(maint) Don't check for Facter.search

Facter has defined `Facter.search` since Facter 1.5, which was released
in 2008. Since we depend on Facter >= 1.6.2 we can assume that method
will be present and directly call it.
(PUP-753) Extract benchmark impl into file

The code for setting up and running the benchmark is very specific to
this particular scenario and also too large to keep in a rake file. This
extracts it out into a file that lives inside the scenario. This should
turn into a common interface that all benchmark scenarios can implement
and should allow the maintenance of scenarios to remain separated and
the creation of new ones to be vastly simplified.
Merge branch 'maint/master/facter-search-path-args'
(PUP-753) Generate scenario tasks from filesystem

Since the scenario execution is just defined by a ruby class that lives
in the scenario directory, the scenario tasks can now be generated. This
extracts the description of a scenario into a file (`description`) and
generates a set of rake tasks for each scenario that is in the
benchmarks directory.

This also removes the top-level benchmark task because right now all
scenarios will be using the same class name (Benchmarker), which would
cause name collisions when there are multiple scenarios being run in the
process.
(PUP-753) Include a minimal metadata in each module

This includes a basic, minimal metadata in each of the generated
modules. There is just enough information in the metadata.json file to
cause the module to be accepted by puppet as a valid and usable module.
(maint) Pass Facter.search arrays instead of strings

The implementation of Facter.search expects `*args` while Puppet was
defaulting to a colon separated string. This isn't a valid path but
until Facter commit 6c6c394 warnings were almost always squelched which
prevented this from being exposed. This commit ensures that we split up
our (semi)colon delimited paths into an array and passes them to Facter
in the manner that it expects.
(maint) Don't check for Facter.search

Facter has defined `Facter.search` since Facter 1.5, which was released
in 2008. Since we depend on Facter >= 1.6.2 we can assume that method
will be present and directly call it.
Merge branch 'backport/stable/facter-search-path' into stable
Merge branch 'stable'
(Maint) Remove unused dependencies

There were a few require statements that got left behind when the
benchmark implementation was moved from the rake tasks to its own
file. There was also a vestige of an attempt at using Open3 for
executing some commands. This removes those unneeded require statements.
(PUP-753) Use correct format constant on 1.8.7

The constant for the default format string changed between 1.8.7 and
1.9.3. This adds a check for the ruby version so that it can get the
correct constant.
(PUP-753) Remove duplicate calls to setup

There were two different places calling setup for the benchmarker. This
consolidates it down to one. Unfortunately, the setup method depends on
the generate method having been run already and so it not analogous to
the `setup` task. This meant that setup is actually called in the
`generate` task.
(PUP-1559) Ensure ADSI Group SIDs may be looked up

 - Previously, calling Puppet::Util::ADSI::Group.exists? for a
   well-known group SID would return false, because the WinNT:// style
   URI used to find the group would not examine / lookup the SID, but
   would instead create a broken Uri that the underlying OS could not
   understand
 - Now, the given group name is checked to see if it's a SID before the
   Uri is constructed, and a SID style Uri is created where appropriate

   Paired-with: Joshua Partlow <jpartlow@puppetlabs.com>
Merge pull request #2317 from Iristyle/ticket/master/PUP-1559-adsi-well-known-sids

(PUP-1559) Ensure ADSI Group SIDs may be looked up