Fix browsing projects in a namespace when logged in.
If all the project in the database have only one admin and no other
members, the user_projects table is empty making the part of the query
filtering for public projects or projects that the user has access to
returning an empty table all the time.
To fix this, Slavek Kabrda and I changed the code from using regular
WHERE statements in the query to using a subquery.
The tests have also been found to be broken as they contained no private
repo and were hitting this bug but without saying so.
They have been adjusted that they are now producing the expected behavior.
Merges https://pagure.io/pagure/pull-request/3184
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr></pingou@pingoured.fr>