Prevent pager from overriding the upper limit (fix #59)

This commit introduces a new attribute to the pager, hasnext, which
tells whether there are any next entries to be displayed or not.