(PUP-3244) ENC ignores missing directory environments

When using an ENC, if an environment that didn't exist was defined for a
node puppet would place the node into the production environment instead
of raising an error to alert the user that the environment that had been
requested did not exist.

This commit changes the behaviour when an environment is defined in an
ENC but does not actually exist. Instead of placing the node into the
production environment a Puppet::Environments::EnvironmentNotFound error
is raised.
(PUP-3244) Acceptance Tests for Nonexistent Environments

Added acceptance tests to test if an error is raised if an ENC specifies
a nonexistent environment for a node.
(PUP-3244) Validate Environment Before Setting

Before this commit the environment validation was happening for the Exec
terminus instead of on the node object itself. This fix should help all
node objects from having invalid environments when its environment is
set using `Puppet::Node#environment=`.
(PUP-3244) Add Puppet::Environment::Directories#get! method

This new function will return the directory environment or raise an
error if a directory environment does not exist. This gets rid of the
need to check if environments exist across the codebase before
continuing for the areas where we need.
(maint) Modify other uses of get() to get!()

There were several uses of get() that either immediately checked for nil
and raised the UnknownEnvironmentError or assumed non-nil and continued.
This changes all of those cases to use the new get!() method and so be
explicit that they require an environment. There are a couple uses that
still don't require the environment to exist.
Merge branch 'pr/3146' into stable

* pr/3146:
  (maint) Modify other uses of get() to get!()
  (PUP-3244) Add Puppet::Environment::Directories#get! method
  (PUP-3244) Validate Environment Before Setting
  (PUP-3244) Acceptance Tests for Nonexistent Environments
  (PUP-3244) ENC ignores missing directory environments

Closes GH-3146