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.
After some discussion with @zaphod42 , I added this parameter so that we could write some tests for the logic here w/o doing something evil like mocking `Time.now`.  I'm on the fence as to whether the tests are valuable enough to warrant this, but it seemed like we had virtually no coverage prior to this, so I went ahead and threw this in for review.