[api] seperate remove verification steps and re-use prior to moving image to trash
3 - minor
Pull request ID:
Now that images are moved to the trash as a first step, if they have snapshots (or other issues) it might fail. Re-use these checks to avoid moving the image to the trash if it cannot be removed.