Ticket 15653

There is a small bug in calculating change list's page range.
It hasn't been noticed yet due to particular values of constants ON_EACH_SIDE, ON_ENDS.

The pull request contains a fix authored by adamzap and a test.

Please see https://code.djangoproject.com/ticket/15653 for more details.