renamed to endless_pages and made includable as mixing.. also supports passing in a block to allow for per row iteration over the result set