LRUCache can now add items using user-specified keys.

Also misc cleanup of the LRUCache code.