Issue/master/pup 1584 module tool and directory envs

Changes how module_tool gets it's environment so that module_tool can work with both legacy and directory environments.

The Puppet::ModuleTool.set_option_defaults call changes quite a bit and will no longer work as before if explicitly called with an :environment => String, :module_path => String from some third party code.

Also adds equality to Puppet::Node::Environment, which should be reviewed, as perhaps this will cause problems elsewhere?  It affects how $known_resource_types are reset, and had an impact on the specs.  $known_resource_types began leaking between specs when two distinct environment instances with equal attributes were no longer forcing it to be reset.  The explicit $known_resource_types = nil in the after each clause of test helper fixed this.