Move diff pagination into javascript.

The pagination selector is pretty ugly and terrible at this point, and we'll
probably redesign this later, but for now, I'd like to keep it as-is but allow
it to update dynamically so we can load different revisions. This change moves
its rendering into javascript.

Testing done:
Set up a few different revisions with different pagination. Checked that the
pagination selector rendered appropriately in different cases, and that the
different links went to the right pages.

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