path/FastImageCache — pull request #30 by epatey (2014-01-01 18:20:41+00:00)
Title: Fix MRU eviction bugs that render the wrong contents for images

This is a proposed fix for #29.

It does a couple of things. First, it keeps track of outstanding references to backing file image bits and declares the associated entityUUID's "inUse". Entries that are in use are immune from eviction, because there is a UIImage out there somewhere that is depending on the bits in the image table file.

This change has the necessary side effect of softening the concept of `[FICImageFormat maximumCount]`. Although, in most cases, this maximum count will have the same effect, there are edge cases in which in the maximum count must be exceeded. Specifically, if there are `maximumCount` entries currently in use, that maximum will be exceeded.

The second change will automatically bump `maximumCount` up to the current number of entries per chunk if it is lower.