[libsocialcache] Remove error artifacts of image downloading

This commit ensures that any file data associated with an image
on disk is removed if the image download fails for any reason.
It also ensures that the appropriate signal is emitted in the case
where an image is queued for download twice.