(PUP-3201) Treat :undef as PNilType

For PUP-2857 :undef was changed from being a PNilType to a PRuntimeType.
This stopped the undef literal in the language from being able to be
assigned to Optional parameters. However, this only happened when the
undef was the default expression for the parameter.
Merge pull request #3194 from zaphod42/issue/stable/pup-3201-undef-not-working

(PUP-3201) Treat :undef as PNilType
(PUP-3244) Fixup test for windows and future parser

The test failed on windows nodes because the acceptance test wasn't
using the `puppet` method from beaker. The test failed on future parser
due to the bare file mode, in 4.0 only string modes will be allowed.

This commit fixes up those issues, and removes the
`acceptable_exit_codes => [0]` since that is the default behavior.
(PUP-3401) Fix type calculations of "all Patterns"

The type calculator did not correctly compute assignability for
a non parameterized Pattern. Such a Pattern is equal to "any string",
and is thus assignable from any other Pattern, Enum or String.

This was missing in the calculator and this resulted in Pattern neither
being equal to, less than, or greater than parameterized patterns.
(PUP-3357) generate implicit names for ssh_authorized_keys if needed

Generated resources from the user type share an empty resource name
if more than one unmanaged key has no comment in the authorized_keys
file (the comment is used for the namevar). This leads to duplicate
declaration errors when the user tries to purge those keys through
the user { purge_ssh_keys } parameter.

Make the provider use an internal pseudo-name in such cases. Generated
resources get the same respective pseudo-name for successful purging.
It is composed of the file name and a numeric index.
(PUP-3357) unit tests for the purging of multiple unnamed keys

Just makes sure that the user type and ssh_authorized_keys provider
generate pseudo-names for keys following the same pattern.
(PUP-3357) integration test for purging of unnamed ssh authorized keys

Add an integration test with an ssh keyfile in which two keys have no name
and make sure that both are successfully purged.
Merge pull request #3164 from ffrank/ticket/3.7.x/PUP-3357-purge-unnamed-ssh-keys

(PUP-3357) purge unnamed ssh keys
(PUP-3334) Clear environment settings caches

Prior to this commit, environment settings were not being updated
when environment.conf was changed, even if environment timeout had
expired. This was because they were being cached in places in
Puppet.settings that were not being cleared.

Now, all the cached data for a particular environment is cleared
when the environment timeout expires.
(PUP-3334) Add test to ensure cache is cleared

In order to ensure that we don't encounter this issue again, add
a test case to environments_spec to ensure that the cache is being
properly cleared.

Additionally, fix a small bug in environment's list method where
a string should been converted to a symbol.
Merge pull request #3197 from hkenney/issue/stable/pup-3334_fix_environment_conf_not_changing_issue

(PUP-3334) Fix issue around settings not updating with environment.conf
Merge pull request #3195 from hlindberg/PUP-3401_fix-pattern-type

(PUP-3401) Fix type calculations of "all Patterns"
(PUP-3277) Use owner from puppet settings rather than beaker defaults

The beaker host['user'] default setting is root, but the actual user
setting from puppet defaults is likely to be puppet or pe-puppet.  By
using the puppet settings, we are more likely to stay in sync with how
the files are being set by packaging or managed by puppet or supporting
puppetlabs modules.  This should cut down on spurious changes to
environment owner/modes that were cropping up in some pe test runs.
(PUP-3277) Ensure agents re-enabled after disable agent test

And a step in the agent_disable_lockfile step to ensure that agents are
re-enabled. This should insulate subsequent tests from a failure partway
through agenet_disable_lockfile leaving disabled agents in its wake.
Merge branch 'issue/stable/pup-3277-envdir-perms' into stable

* issue/stable/pup-3277-envdir-perms:
  (PUP-3277) Ensure agents re-enabled after disable agent test
  (PUP-3277) Use owner from puppet settings rather than beaker defaults
(maint) Only test lookup() with future parser

The lookup function only works when the future parser is in effect. This
changes the spec tests to turn on the future parser.
(PUP-3201) Stop using :undef for parameters in 4x

The :undef symbol was still leaking all over the place internally. This
caused type inference to sometimes end up with Runtime[ruby, Symbol]. By
using nil instead of :undef, everything can be much more
straightforward. Once the code removal for puppet 4 comes into play even
more oddities around how resource parameters are handled can be
performed.
Merge pull request #3210 from zaphod42/issue/stable/pup-3201-incorrect-string-for-undef

(PUP-3201) Stop using :undef for parameters in 4x
Merge branch 'stable'