Generate Link header with paging URLs.

This commit adds support for generating a `link` header which optionally includes first', 'prev' and 'next' links. Previous and next links are only generated when they make sense.