(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=`.