TagCache: More efficient RAM cache utilisation.

Alternatives entries are now stored in the cost-aware manager. Persistently
stored entries are restored with a flag to indicate that no cost calculation
should be performed, and they are subsequently removed when the frame is
destructed (if entries were stored persistently).