Make sure that if an image has been deleted, cached versions of it cannot be served. As per #1659.
This works because delete_image removes the original from disk. The main part of #1659 is actually how to clean up the old cached images. That is not dealt with by this patch.