Fix filtering the orphaned packages (or not) for /api/packages/

Fixes https://github.com/fedora-infra/pkgdb2/issues/54