Pagination middleware for martini