Reorder some operations to make failure recovery more reliable
Reorder some operations to make failure recovery more reliable

By marking the component installed before installing, an uninstall
should succeed at rolling back a partially-successful install.

Similar rationale for setting the installer version number before
installing.

rust-lang/rust-installer,rust-lang/rust-installer