A 200 answer to a Range request was appended onto the partial file, so the
temp file grew past the real resource and the next resume asked for a range
beyond its end - the 416 from #210. Read the total from content-range on 206,
and replace rather than append when the response is a full 200.
Also recover a temp file that is already bigger than the resource instead of
asking for an out-of-bounds range, so users currently stuck on 416 get fixed
without deleting the file by hand.
Worker: close the event loop, and drop the task id from running_tasks even
when the coroutine raised - a failed task used to block its own re-submit
forever.
Co-authored-by: XiaoJiang0208 <jjm1837080396@gmail.com>