A simple generic pagination representer for ROAR, taken from http://nicksda.apotomo.de/2012/05/ruby-on-rest-6-pagination-with-roar/