(maint) Use MatchData object over ruby global vars

The implementation for native file headers for the ParsedFile providers
made use of the Perl style global variables like $`, $', and $&. These
are difficult to understand at first glance and equivalent behavior is
provided by MatchData objects. This commit removes the global variables
with a MatchData object for clarity.
Merge pull request #1489 from adrienthebo/maint/master/parsedfile-human-readable-match-variables

(maint) Use MatchData object over ruby global vars
(#14093) Cleanup tests for template functionality

Some of the previous tests were unneeded (check for simple existance) or
mis-named. This cleans those up. A few other tests were trying to
indirectly test many things at once (the ones about access to instance
variables). Instead of the indirect test this splits it into much more
specific tests and statement of behavior.
(#14093) Remove unsafe attributes from TemplateWrapper

The attribute accessor for the :string attribute in the TemplateWrapper
conflicted with a variable being in scope that is named string. The
variable would take precedence and because of the way the
TemplateWrapper accessed the value of the attribute, the variable's
value would be used as the template.

This changes the TemplateWrapper to completely remove :string as an
attribute and only use local variables. This also removes the :file
attribute in favor of a "private"-style naming of the instance variable.
There are no collisions with @__file__ that would cause problems, but
this should reduce the likelihood of them happening in the first place.
(Maint) Remove special handling for symbols in scope

The Puppet::Parser::Scope no longer allows variable names that are not
String objects, so the extra code to handle non-string variable names is
no longer needed.
(#14093) Restore access to the filename in the template

The change to fix certain variables interfering with template evaluation
also removed the accessor method for file. It appears that this is a
mechanism that had been used by others for identifying the name of the
template being evaluated so that they can trace back from a file on a
node to the module and template that created it. This restores that
functionality.
(Maint) Add YARD to TemplateWrapper

This tries to document the methods that should be available to template
authors. Not all methods are listed, since there may be some things that
are mixed in somehow and there are all of the variable accesses provided
via method_missing.
(maint) Kill Puppet::Parser::TemplateWrapper#scope=

This is dead code that is never called based on `ack` and replacing the
method body with an thrown exception.  The scope instance var is stored
in @__scope__ not @scope.
Merge branch 'zaphod42-issue/master/14093-string-overrides-all-template-output'

* zaphod42-issue/master/14093-string-overrides-all-template-output:
  (maint) Kill Puppet::Parser::TemplateWrapper#scope=
  (Maint) Add YARD to TemplateWrapper
  (#14093) Restore access to the filename in the template
  (Maint) Remove special handling for symbols in scope
  (#14093) Remove unsafe attributes from TemplateWrapper
  (#14093) Cleanup tests for template functionality