Fix retrying crate downloads for network errors
Fix retrying crate downloads for network errors

Previously the `with_retry` loop was a little too tight where stale state about
the sha256 and data was kept out of the loop. Instead we need to reinitialize
these on each iteration of the loop to ensure that we correctly retry by
forgetting the data we previously downloaded for an aborted download attempt.

durka/cargo,sbeckeriv/cargo,tsurai/cargo,nipunn1313/cargo,tshepang/cargo,eminence/cargo,rustyhorde/cargo,tsurai/cargo,rustyhorde/cargo,rustyhorde/cargo,rust-lang/cargo,eminence/cargo,eminence/cargo,sbeckeriv/cargo,rust-lang/cargo,rust-lang/cargo,durka/cargo,tsurai/cargo,durka/cargo,achanda/cargo,achanda/cargo,eminence/cargo,tshepang/cargo,tshepang/cargo,vojtechkral/cargo,achanda/cargo,sbeckeriv/cargo,achanda/cargo,vojtechkral/cargo,tsurai/cargo,vojtechkral/cargo,nipunn1313/cargo,nipunn1313/cargo,nipunn1313/cargo,rust-lang/cargo,rustyhorde/cargo,sbeckeriv/cargo,tshepang/cargo,tsurai/cargo,durka/cargo,vojtechkral/cargo