Fix EZP-23037: multiple JOINs in Subtree criterion

JIRA: https://jira.ez.no/browse/EZP-23037

Problem: 
Subtree criterion is used in content search for user roles/permissions in policy and role assignment subtree limitations.
Given enough limitations, this will cause many JOIN clauses on simple content searches.
Depending on conditions, the above can cause severe performance degradation leading to MySQL timeouts (queries not finishing).

Since it seems there is no actual need for multiple joins, and the where conditions can all be done on the same table, this PR replaces the "unique table name join" with a single join clause on the contentobject_tree table, by looking at the existing aliases in `$query`.
> Anything built in to the Query objects in Doctrine maybe?

@andrerom no, we could implement something like `isJoined()`, but it would be quite ugly IMHO and as far as I know nobody provides something like that.

> do you know about another way to deal with this? 

One alternative could be to use `$converter` to store join info, we would then need to manage that data (reset it as needed). Not very pretty either.

Other alternative would be to always join with `ezcontentobject_tree`, it would add additional join in all cases but would be cleanest implementation wise, so I would go with that one.