Paginate recent queries

This implements range based pagination for recent queries page.

@yuvipanda , seems like both bugzilla and phabricator instance of wikimedia are down because of the migration from bugzilla to phabricator. So, I am putting up this feature for review here. Once phabricator is up, I will create a ticket over there and push the branch for review over gerrit.