Fix pagination for small page count

When the page count drops below a minimum value, just show
the whole range.

Also updates the tests to use testscenarios to simplify the test
specification.

Change-Id: I0f11fb1ef9a96e55508e0ce5cdcef4225a67b803