add pagination to gist and repo lists

and simplify the near-identical table listing templates, since this would have required copying the same content in three templates.

closes #268