fix: retry requests that fail due to timeout or request errors (#7745)
### Description
For repositories with a large number of tasks we can get an
`REFUSED_STREAM` on a dry run due to the sheer amount of requests we're
making at once.
This PR changes it so we retry requests that failed due to a timeout or
a request error which don't get promoted to a full status code.
### Testing Instructions
Do a dry run with remote cache enabled on a repository with 200+ tasks.
You should get a consistent number of cache hits with the PR.
Closes TURBO-2648