Enhancement to paginator

No point in finding the count (via model) if the returned result count
is less than our limit. We then know that the count is the count of our
results
enhancement to paginator

As pointed out, we need to make sure that we are also on the first page
to make this conditional clause valid
Reverse conditions to make the cheapest condition first.

We don't need to do a count() if the page is not 1.

Refs #3333
Fix PaginatorComponent tests.

Because count() queries don't happen in many cases now, the lastQueries
index needs to shift up by one because a query isn't happening anymore.

Refs #3333
Merge branch 'paginate-optimization' into 2.5

Fixes #3333