Use monotonic clock to expire memorized functions

This changes the method to determine if a memorized value has expired
to use a monotonic clock rather than the wall clock. This makes
expiration immune to machine clock drift.