(maint) Remove unused Puppet::Parser::AST::Tag class

It has been hiding in a corner for 8 years. Unused.
Now removed.
(PUP-2689) Make AST Resource check tags against "inherited" tags

This overrides the tagged? method in AST Resource to also search
for tags in its containing resource. These tags will be set when
the resource is finalized (just before serialization on transformation
to external format).

If this is not done, resources will have a different tag set when
a search is made for the node itself (exported or virtual) vs. searching
external resources.

This also correct minor problems with passing an array (which could
result in an array being set as a tag).
It was also possible for empty tags to be set if a string tag contained
multiple :: in sequence, or if ending with ::. Now an error is raised
for these conditions (just like for empty segments generated by using a
sequence of commas (which was on a different code path).
(maint) Update file mode for future parser

The future parser preserves number literals as actual numbers. This
causes problems for modes on file resources because 640 is the decimal
number 640 and not the octal 640.
(maint) Stop leaking file handles

File.new(f) results in a file handle being used. The test manifest in
this case ended up leaking file handles which caused the master to run
out of file handles while serving a request. This lead to a consistent
failure on the first thread requesting the catalog where the error
reported was:

  Could not autoload puppet/type/notify: no such file to load -- /usr/lib/ruby/site_ruby/1.8/puppet/type/notify.rb

The error was misleading. The underlying problem was not an ENOENT, but
an EMFILE (Too many open files). By switching to File.read(f) the
manifest will no longer leak file handles.
(maint) Add sitemoduledir to env env tests

These two tests set up a 'special' environment, and made the assumption
that the modulepath could be reset to something that did not include the
sitemoduledir.  In PE, not having this directory on the modulepath will
case a pluginsync on the master to remove all of the PE modules,
potentially causing problems for subsequent runs.  Adding the
sitemoduledir to the modulepath if we are running a pe master ensures
the pluginsync libdir is not cleared.
(maint) Update test to use resource matcher

The other test added for checking the tagging behavior used the resource
matcher but the current compiler spec didn't. This updates it to be
consistent with the future compiler spec and use the matcher.
(maint) Remove failure for empty generated tags

Commit 0436eb1e0997a6f19ea734923a1b82625a4034f8 added an extra failure
condition for any generated tags that end up being empty strings. This
was to get it to handle that the same way that it handles a simple empty
string tag. However, this could break any installations that generate
"::" separated tags that could create 4 ":" in a row ("a::::b"), and it
also doesn't address enough of the odd tagging behavior to make it worth
it. This commit reverts that change and adds some more tests to cover
some more of the ways in which setting tags behaves.
Merge branch 'pr/2712' into stable

* pr/2712:
  (maint) Remove failure for empty generated tags
  (maint) Update test to use resource matcher
  (PUP-2689) Make AST Resource check tags against "inherited" tags
  (maint) Remove unused Puppet::Parser::AST::Tag class
(PUP-2364) Use the the puppet config vardir setting

instead of the beaker variable puppetvardir.  This change, while
pleasing in and of itself, was needed for testing on AIX.  The vardir
used there by puppet is different, and Beaker does not track a separate
set of defaults for AIX.
Merge branch 'pup_2364_spike_vars' into stable

* pup_2364_spike_vars:
  (PUP-2364) Use the the puppet config vardir setting
(PUP-2635) use generate instead of eval_generate to purge ssh keys

The generating of ssh_authorized_keys resources for purging is implemented
in Puppet::Type::User#eval_generate. The resources are added as the graph
is being traversed.

This exhibits unexpected behavior under certain circumstances. Specifically,
generated keys can be considered already absent (and hence in sync) if there
is a package resource in the catalog. The error disappears when the
functionality is moved from the eval_generate hook in favor of the generate
hook.

The reasons for the wrong behavior is an issue between the transaction code
and the eval_generate mode of operation. During evaluation, the transaction
will call its #prefetch_if_necessary hook for each resource in turn, which
relies on #resources_by_provider. The latter has a cache and misses all
resources that are added using eval_generate after the initial method call.
As a result, those resources are not passed to the provider for prefetching
and thus remain in an uninitialized state, just as though the resource
would not exist on the target system (ensure => absent). They are therefor
not eligible for syncing/purging.
(PUP-2635) integration test for the purging of authorized ssh keys

Compile manifests that purge keys from a specific file and verify
their effect. Adds a test that detects the eval_generate problem
fixed in this branch.