[Fix] Bugzilla #17897 - MemoryCacheEntryPriorityQueue throws out of bounds after shrink
- when MemoryCacheEntryPriorityQueue grows the timed items after a shrink
  the value of the member variable heapSize is wrong allowing an out-of-
  bounds exception which would normally be prevented by bounds tests
- A test case was added for the out-of-bounds exception
Merge pull request #934 from exony-craigminihan/bugzilla#17897-B

[Fix] Bugzilla #17897 - MemoryCacheEntryPriorityQueue throws out of boun...