Initiate deletion of image files if the import was interrupted

If the image is deleted by appropriate API call while its content
is still being uploaded in import task in v2, an exception is raised
and it is not handled in the API code. This leads to the fact that
the uploaded image file stays in a storage and clogs it.

There existed code that safely removes image files if the exception
occurs.

Change-Id: I4f7d1aa103f4ce7abf4026e7097b9e76c24135fa
Closes-Bug: 1371118
Merge "Initiate deletion of image files if the import was interrupted"