core: handle failed import of template

When failing during the import of a template, the engine should attempt to
delete the created images and not just remove it from the db to avoid
storage leak and possible CDA message/inconsistent data during another
try to import the template with same image guids.
If any images are failed to be removed, they would remain with ILLEGAL
status - an attempt to import again with the same ID will result in CDA
message.

Change-Id: If90414b6c50d922b510a10e20e0774bdbec9c05b
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=908327
Signed-off-by: Liron Aravot <laravot@redhat.com>