rustup: add support for caching of old nightlies, download resumption and verification

This allows rustup to be used for bisecting bugs across the nightlies, which can really help to speed up tracking down bugs. In addition, this PR changes rustup to use curl's download resumption, and also adds hash verification of the downloads to make sure they are not corrupted. We still need to add GPG signing in order to protect against someone tampering with the downloads though.