[OPENENGSB-3663] improved model query performance

Pull request https://github.com/openengsb/openengsb/pull/858 needs to be merged before.

http://issues.openengsb.org/jira/browse/OPENENGSB-3663