Fixing total_pages in ResultSet

ResultSet#total_pages is used by will_paginate etc. to determine the length of
the paginator. If I'm not totally wrong, this number has been calculated in the
wrong way, as it was determined by limit / per_page, where limit, when not passed
in as an option, defaults to the database_size. What we actually want is
hits / per_page of course.

Tests are changed accordingly.