Remove pagination when there is only one page.

Fixes https://github.com/fedora-infra/pkgdb2/issues/41
Update checking if there is a total_page before checking it

Relates to https://github.com/fedora-infra/pkgdb2/issues/41