(PUP-2158) Hide dir envs behind a feature flag

In too many cases, having the directory environments enabled by default
caused many user's dynamic environments to be detected as directory
environments. This caused broken environments, sometimes in very subtle
ways.

This changes it so that directory environments are not enabled by
default, but can be turned on. It does this by defaulting the
environmentpath to the empty string, and using the empty string to
denote disabled directory environments. When directory environments are
enabled, legacy environments are disabled, and vice versa.
(PUP-2158) Default a missing manifest to no_manifest

The tests were often creating environments that didn't need to have
manifests. Since we didn't have a way of specifying that when they
were written, we used '' to fill in the blank. This actually caused a
large number of tests to try to find code to load in the PWD, which
caused tests to break if a developer had parse errors in manifests being
used for testing in the root directory of their puppet project. This
changes the manifest to be optional and removes '' from those tests. The
tests no longer fail if a bad manifest is in the PWD :D
(PUP-2158) Report 404 for missing environment

Now that there is a possibility of environments not existing (when
directory environments are enabled) the API needs to report a 404 Not
Found error when the client requests an environment that doesn't exist.
(PUP-2129) Fix issues with false interpolation start (no-such-method)

This is a fix for the reported issue that 'slurpfunc' is an unknown
method. Thankfuly that problem masked a much worse problem in that any
false interolation start e.g. $%a was not correctly implemented, and
there were no tests that covered this.

The same issue also existed for interpolation in heredoc.
This commit fixes the interpolation problem, and adds tests.
Merge pull request #2518 from hlindberg/pup-2129_false-interpolation-start

(PUP-2129) Fix issues with false interpolation start (slurpfunc)
(PUP-2158) Fix integration apply application spec

With the environmentpath defaulting to an empty string, we were
attempting to create a '/production' environment directory in the spec
and failing because of permission issues.  Setting environmentpath to a
temp directory before hand now, which was it what was being done in the
test_helper.rb previously.
(PUP-2158) Test dynamic environments with an empty environmentpath

Additional acceptance tests looking for possible collisions between
dynamic and directory environments.
(PUP-2158) Unlist configured environment

The addition of a default configured environment when setting up
directory environment loaders without legacy environment loaders is
necessary to provide a bootstrapping env for puppet.  But this env was
also being listed when puppet was queried about it's enumerable
environments.  Since the static configured environment is not actually
useable in a meaningful way by an agent, it makes no sense to list it.
This commit provides a StaticPrivate loader, which, like Legacy loader
does not list its environments.
Merge pull request #2519 from jpartlow/issue/stable/pup-2158-hide-dir-envs-behind-feature-flag

Issue/stable/pup 2158 hide dir envs behind feature flag
Merge remote-tracking branch 'upstream/stable'

* upstream/stable:
  (PUP-2158) Unlist configured environment
  (PUP-2158) Test dynamic environments with an empty environmentpath
  (PUP-2158) Fix integration apply application spec
  (PUP-2129) Fix issues with false interpolation start (no-such-method)
  (PUP-2158) Report 404 for missing environment
  (PUP-2158) Default a missing manifest to no_manifest
  (PUP-2158) Hide dir envs behind a feature flag

Conflicts:
	lib/puppet/node/environment.rb
	spec/unit/environments_spec.rb