Add unit-tests checking the output is consistent if you use count=True or not
Add more tests for pkgdblib.search_package to make sure the pagination works properly
Rewrite the Package.search method

Instead of using several join and subqueries, we have one query that finds
all the distinct and relevant package.id as subquery of the final query
retrieve the entire Package object.

This speeds things up quite a bit.
Return only Approved Packages in the critpath endpoint and replace join by a WHERE
Avoid using request.url in the form, rely on url_for instead

Fixes https://fedorahosted.org/fedora-infrastructure/ticket/4362
Mention in the options menu if the package is in critpath or not