(PUP-3505) Fix problem with passing explicit undef res parameter

With the future parser in effect and a resource attribute is undef the
logic that checks for missing arguments did not report the parameter.
This in turn led to that the logic that either fails the operation, or
assigns the default value to completely skip that parameter/argument.
Subsequently a reference of that parameter ended up picking the same
variable from an outer context.

The fix is to equate a nil value (4x) with an :undef value (for 3x) when
computing the missing arguments.

A test is added that tests the functionality.
(PUP-3500) Avoid cacheing environment values when handling setting hooks

Environment in parse_config is being used to ensure that settings in the
current run_mode's environment are checked for hooks, and to handle
hooks that are simply on_write.  In this latter case, the code looks up
the value of the setting from all available elements of the setting's
search_path including the current environment layer.

But if directory environments are in use, their environment settings
cannot be looked up at this early point in settings initialization (we
have no environment loaders), and the consequence is that we end up with
a ChainedValues instance cached in the Settings @values[:env][:runmode]
that does not have a section for :env.  This then blocks resolution of
the real environment settings at a later date.

The fix in this patch is to construct a temporary ChainedValues instance
for the lookup rather than invoking value(), thus avoiding the cacheing.

Since none of the documented environment settings has a hook, we were
very tempted to yank out the environment handling entirely, but this
would leave us with yet more odd behavior if a hook was added to an
environment setting in the 3.7.x series for some unknowable reason, and
it was then set in a legacy environment block.

* the question of how to handle Setting hooks for directory environment
settings is open in PUP-3507

Paired-with: Britt Gresham <britt@puppetlabs.com>
Merge pull request #3228 from jpartlow/issue/stable/pup-3500-avoid-cacheing-chained-values-when-handling-setting-hooks

(PUP-3500) Avoid cacheing environment values when handling setting hooks
Merge pull request #3229 from hlindberg/PUP-3505_given-undef-not-considered-missing

(PUP-3505) Fix problem with passing explicit undef res parameter
Merge branch 'stable'

* stable:
  (PUP-3500) Avoid cacheing environment values when handling setting hooks
  (PUP-3505) Fix problem with passing explicit undef res parameter