Replace O(n) iteration in trim()

Instead of doing a blind `for (k in lruList)`, keep track of the actual
least-recently-used value in that list, and walk only as much as
necessary.

Also, be savvy about deleting an item, and updating the lru index if
that hit is the least recently used value.
v2.2.3