(PUP-3035) Add /var/run/puppet to debian packaging

Previously /var/run/puppet was created only during service start on
debian for both puppet and puppetmaster services. However, as it is used
in both of those services, it makes sense to have it owned and created
by one of the puppet packages. puppet-common is a dependency of both the
puppet and puppetmaster packages, so this commit adds /var/run/puppet to
the puppet-common.dirs file so it will be created in that package. This
also brings parity between redhat and debian packages in this respect,
as redhat puppet packages create the /var/run/puppet directory already.
This also adds a dpkg-statoverride call to manage permissions for the
/var/run/puppet directory.
(PUP-3035) Refactor dpkg-statoverride calls in puppet-common.postinst

This commit does some simple refactoring int he puppet-common.postinst
to avoid some unneeded repetition.
(PUP-2914) Remove remaining rgen dependencies

In 6a94700, the rgen 0.7.0 library was added to the vendor directory in puppet,
and as such is no longer an external dependency. This commit removes the rgen
package as a dependency of the puppet rpm and deb packages, so that it is not
installed in addition to the vendored rgen (or worse even installed at a
conflicting version).

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Merge pull request #3007 from MosesMendoza/PUP-2914/master/remove_rgen_deps

(PUP-2914) Remove remaining rgen dependencies
PUP-2040/PE-3113 Ignore symlinks in module build with pmtignore.

Before this commit, pmtignore functionality worked, but only after
checking for symlinks, so it was impossible to ignore symlinks. This
commit allows symlinks to be ignored, too.
(docs) Revise and unify explanations of module/file references in function docs
(PUP-3117) Allow multiple *=> in the same body and error on duplicate

This fixes a problem in the grammar that made it impossible to have
more than one *=> per body. 

This commit also adds a check for duplicate entries in the resulting
hash with the final set of parameter to value mapping.
Merge pull request #3014 from andersonmills/fix/master/PUP2040-gitignore_symlinks

PUP-2040/PE-3113 Ignore symlinks in module build with pmtignore/gitignore.
(PUP-3117) Add tests for combination of default / hash
(docs) Mention file() function in file type's content attribute

Now that this function works in a more useful way, we can advertise it a bit
more widely.
PUP-2040/PE-3113 Remove symlink-ignore tests for symlinkless OSes

Before this commit, the spec tests checked for symlink-ignore behavior on all
OSes. After this commit, the spec tests only check symlink-ignore
behavior on OSes that have symlinks.
Merge pull request #3018 from andersonmills/fix/master/PUP2040-fix_symlink_testing_on_windows

PUP-2040/PE-3113 Remove symlink-ignore tests for symlinkless OSes
(docs) Clarify note about ssh_authorized_keys in resources resource type

It's not that it's deprecated, it's that it never worked.
(PUP-2349) Force mode property to be a string

The initial commit for this ticket missed the case where
the mode value isn't explicitly specified but rather comes from
source permissions of a file resource, e.g. as happens during
pluginsync.

This change ensures that mode from a source permission is
converted to an octal string if it's a Numeric.
(PUP-2349) Specify mode as an octal string consistently in spec manifest snippets

In the puppet 4.0 parser, the file resource's mode property will be
required to be a string containing an octal (or symbolic) representation
of mode.

For consistency then, this commit changes all cases where mode was
specified as a Numeric to be a string containing an octal representation
of mode (always prefaced with a 0, again for clarity and consistency).
(maint) Make PuppetSpec::Language emit more helpful stack traces

This change was required to be able to see anything relevant regarding
where a problem originated. The fix is to patch the stacktrace
for failed expectencies. While not ideal there is very little that can
be done with Rspec 2 to fix this except reimplementing the support for
produces and fails to be matchers. (Rspec 3 has composable matchers that
may make this simpler).

A ticket has been logged about further improvements to the two support
functions (produces, and fails).
(PUP-3117) Complete the implementation of resource expression

This completes the implenentation of the Resource Expression.

* The LHS must now be a QualifiedName (i.e. file, notify), or
  a QualifiedReference (i.e. File, Notify), or an access expression
  with a left QualifiedReference (i.e. Resource[file]), or literal
  'class'

* The result of the LHS must be a CatalogEntry type, and it may not
  be detailed to title level.

* The * => syntax can be used to to unfold a hash. It may be used
  once per titled resource body. Attribute names must be unique across
  the attributes set with name => expr, and those set with * => hash.
(maint) Remove unused issue codes APPEND_FAILED, and DELETE_FAILED
(maint) Fix faulty issue ILLEGAL_NUMERIC_PARAMETER and validation

There was a typo in the message that referenced a non existing variable.
This was undetected because there was no test to cover this.

When testing the expected behavior, it was found that the validation
was not correct as it allowed parameters to have hexadecimal names, but
not octal names. Now all numeric parameter names are disallowed (they
cannot be used or addressed anyway).
(maint) Fix bad comment for issue ILLEGAL_VARIABLE_EXPRESSION