[schema] fix buggy composite_rdef_roles and associated test
it should only look at rdefs involving the considered entity type.
Closes #3712982
ifnotrql('CWConstraintType X WHERE X name "RQLUniqueConstraint"',ask_confirm=False):rql('INSERT CWConstraintType X: X name "RQLUniqueConstraint"',ask_confirm=False)