Push the RT::System object, so its ->id is used in WhoHaveGroupRight

This allows better use of indexes, as we have both an ObjectId and an ObjectType
De-duplicate ACLEquiv objects in WhoHaveGroupRight

While this not only makes the generated query somewhat cleaner, in at
least one case the presence of duplicates caused Postgres 9.3 to
generate a massively sub-optimal query plan; removing the duplicate
clauses resolved the issue.
Merge branch '4.2/who-have-right-optimization' into 4.2-trunk