ISPN-4416 Implement sorting and pagination for non-indexed querying (phase I)

This is a simple implementation that sorts all the results just before returning them to the requestor. A second implementation will be provided based on ISPN-4358 when it becomes available.