(PUP-1676) Puppet::Settings retrieves directory environment settings

During a Puppet[:setting] call, legacy environment settings would be
loaded from a puppet.conf stanza.  But settings from directory
environments would never be seen.  Areas in the codebase could obtain
per environment settings by looking them up directly from an
environment.  However a call to puppet config or to an application with
--configprint, would return the default modulepath if redirected to a
directory environment using the --environment setting.

A ValuesFromDirectoryEnvironment class has been added to Settings to
lookup environment settings not found in puppet.conf and which a
Puppet::Environment::Directories loader can find in the
environmentpath.

Because the Directories loader itself depends on the global :modulepath,
a setting, :basemodulepath, has been added, so that we can initialize a
Directories loader without recursing infinitely looking up :modulepath.

The possibility for recursion has been there since at least 3.0.0:

[legacy]
modulepath=/foo:$modulepath

would overflow the stack. It could now be:

[legacy]
modulepath=/foo:$basemodulepath