correct release_type/release_status checking

For both we can filter if we have the right includes OR
the right entities (important for browsing).
Release groups only have a status, but releases have a type and status,
since that is inherited by the group.

I also made PEP 8 changes to the checking function.