FOR REVIEW: (PUP-3555) Add override-able factory for environment cache entries

NOTE: this isn't quite ready for merge; I need to test it a bit more from Puppet Server, but I wanted to get it pushed up for some initial feedback because I have a few questions/concerns.
------------------------------------------------------
This commit adds a new `cache_entry_factory_class` variable that
allows a caller to override the default implementation of the
logic used to create a cache entry for an environment.

It also abstracts out the method that is used to retrieve the
current system time, so that it can be passed in as a parameter
to the factory constructor to support testing.
I'm not entirely in love with the fact that I had to make the environment config a parameter for this method, but I didn't see a clean way to access `get_conf` from within this class.  Open to suggestions.

For a moment I actually thought that maybe having the environment config passed in as a parameter would open some additional doors for writing tests, but it turns out that it's really hard to construct a useful instance of that class for testing, so it wouldn't be very helpful for tests unless we wanted to use mock objects (which I generally prefer to avoid).