core: Remove usage of dynamic queries from the Backend

Dynamic queries are not optimized, and should only be used for UI search.
This patch will remove usage of dynamic queries from the backend.

Change-Id: I3df981a958fae36edd6ecf3cb2bb47b94b2c446a
Bug-Url: https://bugzilla.redhat.com/1061175
Signed-off-by: lzelkha@redhat.com <lzelkha@redhat.com>