file: Avoid runaway DOWNLOAD/UPLOAD progress reports (#14807)

Curl makes progress callbacks frequently but we round to the nearest
percent and report only when that changes so that we make at most 101
progress reports.  However, when unexpected data beyond the total are
transferred the progress can get beyond 100% and lead to unlimited
reports.  Avoid this case by capping the reported progress to 100%.
Merge topic 'file-DOWNLOAD-cap-progress' into next

413282c0 file: Avoid runaway DOWNLOAD/UPLOAD progress reports (#14807)