Changes to tune eviction loops based on profiling.

Track more pages, but only sort the maximum number of entries we have actually seen.

Alex, can you please take a look?

Thanks,
Michael.