fetch: Fix infinite loop on display progress
As reported by FreeBSD PR bin/153240, fetch can loop forever if it is
interrupted by a signal at just the right time.
Verbatim from FreeBSD SVN 230307 (18 JAN 2012):
Fix two issues related to the use of SIGINFO in fetch(1) to display
progress information. The first is that fetch_read() (used in the HTTP
code but not the FTP code) can enter an infinite loop if it has previously
been interrupted by a signal. The second is that when it is interrupted,
fetch_read() will discard any data it may have read up to that point.
Luckily, both bugs are extremely timing-sensitive and therefore difficult
to trigger.