In `media_sideload_image()`, check the returned value of `download_url()` earlier to avoid attempting to `unlink()` an instance of `WP_Error`.

Props georgestephanis. 
Fixes #28204.


git-svn-id: https://develop.svn.wordpress.org/trunk@28567 602fd350-edb4-49c9-b593-d223f7449a82