[Fix] Bugzilla #17897 - MemoryCacheEntryPriorityQueue throws out of bounds after shrink
- when MemoryCacheEntryPriorityQueue grows the timed items after a shrink
  the size of the memory variable heapSize is wrong allowing an out-of-
  bounds exception which would normally be prevented by bounds tests
- in order to fix the exception the BubbleUp() method was modified
  to make it sort the timed item list, previously the logic did
  not result in sorted items which the cache did not flush in a timely
  manner
- BubbleDown() now just moves items down the array
- MemoryCacheEntry now implements IComparable<MemoryCacheEntry>
- A test case was added for the out-of-bounds exception