(PUP-2692) Fix memory leak in directory environments

The directory environments exhibited a memory leak when the environment_timeout
!= unlimited. The problem came down to equality of Puppet::Node::Environment
being incorrect and the fact that the directory environments refresh caches by
recreating instances of that class.