Makes a weak-cache-factory available. Entries will be eagerly collected by the jvm, rather than only when there's memory pressure.
Implementation is fairly simple. I changed SoftCache to NonStrongCache and added an extra record parameter, which is the function
used to create the reference.
This looks interesting. For backward compatibility reasons, I would not want to change any of the public names, but I'd be open to a patch that is purely additive to add the NonStrongCache and reimplement SoftCache in terms of it, as well as adding the WeakCache.