core: Fix performance issues with GetHostsAndVmsForClusters
core: Fix performance issues with GetHostsAndVmsForClusters

GetHostsAndVmsForClusters takes >30s in performance environment.
This is caused by an uneeded join between vm_static and vds_static.
This patch uses 2 sub-selects to eliminate the join and improve the performance.

This decreased execution time in the performance environment from 30s to <1s

Change-Id: I185e157bb00596c10449b637bf0c9a2c3b9d21e5
Bug-Url: https://bugzilla.redhat.com/1186737
Signed-off-by: c5542eaf646591383f6b59a9b598fa7b32c0cb99@redhat.com <c5542eaf646591383f6b59a9b598fa7b32c0cb99@redhat.com>

walteryang47/ovirt-engine,yapengsong/ovirt-engine,yingyun001/ovirt-engine,walteryang47/ovirt-engine,yingyun001/ovirt-engine,yapengsong/ovirt-engine,zerodengxinchao/ovirt-engine,walteryang47/ovirt-engine,OpenUniversity/ovirt-engine,yingyun001/ovirt-engine,zerodengxinchao/ovirt-engine,walteryang47/ovirt-engine,eayun/ovirt-engine,yapengsong/ovirt-engine,walteryang47/ovirt-engine,zerodengxinchao/ovirt-engine,zerodengxinchao/ovirt-engine,OpenUniversity/ovirt-engine,OpenUniversity/ovirt-engine,zerodengxinchao/ovirt-engine,OpenUniversity/ovirt-engine,yingyun001/ovirt-engine,eayun/ovirt-engine,yapengsong/ovirt-engine,yingyun001/ovirt-engine,eayun/ovirt-engine,eayun/ovirt-engine,OpenUniversity/ovirt-engine,eayun/ovirt-engine,yapengsong/ovirt-engine