Add code from omnibus 3 to retry failed downloads

The omnibus-3 branch has retry code for failing downloads.  This is very helpful for imperfect networks, and it would be great to have this in version 4 as well.