RAM Cache: Use an ADT.Heap instead of a multiset.
This reduces the performance penalty when the priority of a
CacheEntry is changed in a server with a huge amount of entries.
Also fixes the missing cost update on hit for the CM_GDS_Time cache.
Note that there may still be some thread races lurking.
Fixes [bug 7727 (#7727)].