Fix the calculation of the previous index in a paginated resource list.

The max() call used to calculate the previous index was missing a constraint
value, causing an error when generating the link. We now constrain it to be
no less than 0.

Reviewed at https://reviews.reviewboard.org/r/5989/