core: ImagesHandler.getAllStorageIdsForImageIds

Extracted a method to get all the relevant storage domains IDs from a
collection of DiskImages, and added some tests to it.

This method will be used in subsequent patches in the effort to decouple
ImagesHandler.PerformImagesChecks, but in the meanwhile it's main
benefit is the added unit test coverage.

Change-Id: If1b4d7231a03ea5a6d991609a65951fe4e279ef5
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: RemoveSnapshotCommand: move image validation

RemoveSnapshotCommand's canDoAction performs several validations only if
the VM has images, and several regardless.

Since ImagesHandler.PerformImagesChecks originally also validated VM
states, it was called regardless of whether the VM has images or not.
Since this is no longer the case, it can now be moved to its rightful
place.

Change-Id: I5e491f97134c3017fd53bfc159cf47f83ba74ae7
Signed-off-by: Allon Mureinik <amureini@redhat.com>