(#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.
Revert "Revert "Merge branch 'nicklewis-rcS-is-a-jerk' into stable""

This reverts commit dd4d41e97fe21c9bd9f628fb4f982aead04cc213.
(maint) Handle different ssh service names in `puppet resource service` test

This test was using a regex to match the output for the ssh/sshd service
from puppet resource, but was explicitly invoking the command with the
name ssh. Since we can check the state of that service from the list of
all instances (in which case the regex is actually beneficial), there's
no need to look at the specific service separately. This combines the
two steps, and makes the test more robust to different names for the ssh
service.
fix caching of "false" settings
Merge branch 'nicklewis-fix-puppet-resource-service-test' into stable

* nicklewis-fix-puppet-resource-service-test:
  (maint) Handle different ssh service names in `puppet resource service` test
  Revert "Revert "Merge branch 'nicklewis-rcS-is-a-jerk' into stable""
Merge branch 'stable'

* stable:
  (maint) Handle different ssh service names in `puppet resource service` test
  Revert "Revert "Merge branch 'nicklewis-rcS-is-a-jerk' into stable""

closes #1620
Add DRY support for boolean parameters

Boolean parameters are common and used several places in the codebase,
as well as in user code.  Without this change, each parameter requires a
description of true and false values, and code to recognize those
values.  That is implemented slightly differently from place to place,
leading to inconsistent behavior for users.  And anyway, it's all WET.

Instead, this concentrates the implementation in one place.  This is
easier for users (a consistent set of true/false values) and developers
(less boilerplate and easy resulting values -- Ruby's true and false,
not :true or "true" or anythign like that).
(maint) Fix ENC acceptance test failure on 1.9.3

Without this patch the `node_overrides_topscope_when_using_enc`
acceptance test is failing when run on MRI 1.9.3 and is passing when run
on MRI 1.8.  This is a problem because Puppet 3 fully supports MRI 1.9
and we need the tests to pass.

The root cause of the problem is an incorrect YAML input file when
providing data to the ENC api.  Without this patch the YAML uses a hash
value that is a string.  In MRI 1.8 String#each iterates over each
character.  The string passed is a single character, "a" so the behavior
in 1.8 has the desired effect by accident.

In MRI 1.9 there is no String#each method so the test fails.  This patch
addresses the problem by changing the YAML to be the correct input of a
hash value that is an Array.

Paired-with: Henrik Lindberg <henrik.lindberg@cloudsmith.com>