Fixes 3047 - SortingUtil integer overflow during comparision 

The cause of issue is that results from inner predicate are sorted as keys but in "PagingPredicate", they are compared by its values by using hash-codes. If the hash-code method is not overriden, it can run in a infinite loop or loops for very long time since default implementation of "hashCode" method returns a generated number by using object's internal memory address. 

Generally hash-codes are not meaningful for values but for keys. So if values are not comparable, even though iteration type is "VALUE", we should use keys for comparison.

Fixes #3047