fix(qc): fix nested aggregations (#5572)
[ORM-1170](https://linear.app/prisma-company/issue/ORM-1170/fix-failing-filter-count-relations-test)
Refactors the code to re-use `into_select` which automatically handles
nested aggregations. It also adds cursor filters that we were previously
missing and relied on finding the cursor in memory. It changed a lot of
snapshots because I needed to swap the two sides of the `JOIN` in order
to re-use existing code.
Also fixes a test on the client:
https://github.com/prisma/prisma/pull/27792