core: Improve performance of GetAllSnapshotsByStorageDomainId
core: Improve performance of GetAllSnapshotsByStorageDomainId

GetAllSnapshotsByStorageDomainId returns a huge number of duplicate rows.
Under load this creates a memory issue.

This patch solves this.

Change-Id: I87207b3c284c161b0d0dfa72d21fb47593d010b3
Bug-Url: https://bugzilla.redhat.com/1190471
Signed-off-by: c5542eaf646591383f6b59a9b598fa7b32c0cb99@redhat.com <c5542eaf646591383f6b59a9b598fa7b32c0cb99@redhat.com>
eayun/ovirt-engine,yingyun001/ovirt-engine,yingyun001/ovirt-engine,OpenUniversity/ovirt-engine,walteryang47/ovirt-engine,eayun/ovirt-engine,OpenUniversity/ovirt-engine,OpenUniversity/ovirt-engine,yapengsong/ovirt-engine,zerodengxinchao/ovirt-engine,OpenUniversity/ovirt-engine,eayun/ovirt-engine,zerodengxinchao/ovirt-engine,yingyun001/ovirt-engine,walteryang47/ovirt-engine,zerodengxinchao/ovirt-engine,zerodengxinchao/ovirt-engine,OpenUniversity/ovirt-engine,yingyun001/ovirt-engine,yingyun001/ovirt-engine,yapengsong/ovirt-engine,yapengsong/ovirt-engine,walteryang47/ovirt-engine,walteryang47/ovirt-engine,yapengsong/ovirt-engine,eayun/ovirt-engine,eayun/ovirt-engine,walteryang47/ovirt-engine,yapengsong/ovirt-engine,zerodengxinchao/ovirt-engine