Prior to this fix we were uploading 0 length bodies if a retry was
needed on a multipart upload chunk. This gave this error `http:
ContentLength=268435496 with Body length 0`.
Fix by remaking the hash appending reader in the Call loop. This is
inefficient in the face of retries, but these are uncommon.
Each part of a multipart upload takes 96M of memory, so we make sure
that we don't user more than `--transfers` * 96M of memory buffering
the multipart uploads.
This has the consequence that some uploads may appear to be at 0% for
a while, however they will get going eventually so this won't
re-introduce #731.
Originally it was thought the upload URL expiring would provide 401
errors so it was excluded from reauth when doing uploads, but on
re-reading the docs and looking at this issue it seems that 401 errors
are only caused by the account token expiring and not the upload token
expiring.
We will refresh both the upload token and account token on a 401 error
while uploading, and just the account token when we get a 401 at any
other time.