Refs #13590 Optimize queryContentType component. Now it's 5 times faster

- Tested getBackwardRelationWith on an object with 46 backward relations
  Before: 10.6900231838 s
  After:   2.6814491749 s