Improve pagination logic for item directories.

Make sure that filter values passed through `$_GET` are passed along to
`paginate_links()`.

See #1272.