(#2437) Prepare tests that illustrate the issue

This patch takes the 3 examples provided in the issue description and
ensure that they fail when needed. It will help fixing the issue.
(#2437) Fix the first invocation of the class having bad parameters types

The first type we use Nagios::Base with a particular type, the method for
the parameters assignemtn are not present yet ; and it creates a side-
effect of changing the type of the parameters to Array.
It did break the rspec tests.
(#2437) Complete the tests to detect a variety of edge cases
(#2437) Escape semicolon (;) when writing Nagios configuration files

In nagios configuration files, semicolon (;) indicates a comment, except
when it is escaped with a backslash (\).
If we output a value with an unescaped semicolon, it will be considered
as a comment by Nagios, also by Nagios::Parser and thus the part
after the semicolon, included, will be lost.
Escaping the semicolon ensures it will be taken into account by
both Nagios and Nagios::Parser.
Cf http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html
Cf xodtemplate.c in Nagios sources
(#2437) Fix the parser : comments, semicolon, ...

Lots of tightly coupled things here :
- The rules were modified to take care of an existing issue
that prevented to have full line comments (Starts with #) or
carriage returns just after a curly brace definition.
- The lexer was modified to consider an inline comment only
when a semicolon is not preceded by a backslash.
When a semicolon IS preceded by a backslash, it is considered
as escaped and is preserved (the escaping backslash is removed)
- The lexer was modified to allow pound (#) at every position
in a line (except the first character, which denotes a full
line comment)

Cf xodtemplate.c in Nagios source
(#2437) Compile the parser to ruby code

Parser is compiled with racc-1.4.9 while it was previously
compiled with racc-1.4.5 ; this causes a lot of cosmetic
changes and diffs.
(#2437) Comments can start with a pound (#) anywhere on an empty line

Nagios allows comments to start with a pound (#) anywhere on the line
if there are only spaces and/or tabs before.
This commit adds a test case for this, and fixes the parser accordingly.
(#2437) Prefer StringScanner in lexer (performance)

The lexer was previously doing multiple string manipulations.
My previous commits fixed the lexer, but introduced a 6x time
penalty compared to the original lexer, which was hard to remove.
Using StringScanner instead of strings substitutions is even
faster than the original lexer.
(#2437) Parser now using StringScanner in lexer (performance)
(#2437) Cosmetic changes for the tests
(#2437) Regex compatibility with Ruby 1.8.x

In the previous commits I was using negative lookbehind, which
are only available in Ruby 1.9+.
Rewritten using a different logic which now works on both versions
of Ruby
(#2437) For ruby 1.9, always consider input text as ASCII
(#17183) Pass on parameters to recursive children in static_compiler

Pass on parameters from the top level resource to recursive children in
the static compiler.
The list of parameters to exclude is taken from the file type
implementation.
(maint) make SRV record lookup more generic
(#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.
(#21749) Make attributes readable on Puppet::ModuleTool::Dependency

Make it possible to read the attributes of these objects
without turning them to PSON and parsing that back again.
(#21785) Module tool should include path part of URI

The module tool ignored the path part of the URI when specifying a
custom module_repository setting.

Example:
puppet module install foo-bar --module_repository=‘http://forge.example.com/forge’

fetched http://forge.example.com/api/v1/releases.json?module=foo/bar
instead of
http://forge.example.com/forge/api/v1/releases.json?module=foo/bar

Same issue when it tries to fetch the file itself.
(#21801) Normalize headers that come through Rack

Previously, although we stripped the leading `HTTP_` from
HTTP headers which Rack turned into environment variables,
we did not restore hyphens from underscores.

The user-visible consequence of this was that the match
to detect whether profiling was request from an agent would
not work when running under Passenger, but did work under
Webrick.

This commit updates the translation routine to turn underscores
back into hyphens. It also fixes an erroneous test fixture; the
sample header 'HTTP_X-Custom-Header' would never been seen in
the wild because environment variables are not allowed to have
hyphens.
Propagate client noop value as a fact

This fixes: http://projects.puppetlabs.com/issues/6847

(which is also a workaround for: projects.puppetlabs.com/issues/20679)