MemoryCacheEntryPriorityQueue used by Runtime.Caching.MemoryCache throws after a resize

The size of the memory cache is reduced by GetHeapWithShrink(). After Array.Resize() is called the array has its new size heap.Length but the member variable heapSize has not been updated.

Later calls to add members to the heap will get an out of bound exception since those methods test against heapSize which is now wrong.