Make `CurlDownloadStrategy` resume aborted downloads

* `CurlDownloadStrategy#_fetch` (and the same methods in its
  subclasses) now fetches the file to a temporary path, and
  `CurlDownloadStrategy#fetch` moves it to the correct location.
* `Homebrew#cleanup` cleans the temporary files `CurlDownloadStrategy`
  creates if they're left in the cache.

Closes #13953.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>