Add `lto` option to profiles.

Closes #759.
Rename --name flags to --<target-name>

With #843 and #839 coming around the bend soon, the original decision for
`--name` everywhere isn't making as much sense, for consistence this is renaming
these flags back to `--<target-name>` for the respective targets.
Stop shuffling output files around so often

This commit is an architectural change inside of Cargo itself in the way that it
handles the output format of builds. Previously when a build start, all existing
directories and files would be renamed to `old-foo` folders. The build would
then `rename` all files back into the right location as they were seen as fresh
and needed for the build.

The benefit of a system such as this is a rock-solid guarantee that the build
tree contains exactly what it would if we were to start the build from a totally
clean directory each time. There are some downsides, however:

* In #800, it was discovered that this method has an unfortunate interaction
  with Docker. Docker apparently will mount many filesystems which `rename` will
  not work across.

* I have seen countless flaky failures on windows due to an attempt to remove a
  file that was still in use somehow. I've never been able to truly track down
  why these failures are happening, however.

The new system for managing output files is to build up a list of all known
files at the start of a build, whitelist any necessary files when the build is
being prepared, and then wipe out all unknown files right before the build
begins. This is not quite as close to the guarantee as the benefits reaped
before because on the second build all build files will still be in their final
output locations, they may just get updated as part of the build as well. This
seems like an acceptable compromise, however.

Closes #800
auto merge of #861 : alexcrichton/cargo/issue-800, r=brson

This commit is an architectural change inside of Cargo itself in the way that it
handles the output format of builds. Previously when a build start, all existing
directories and files would be renamed to `old-foo` folders. The build would
then `rename` all files back into the right location as they were seen as fresh
and needed for the build.

The benefit of a system such as this is a rock-solid guarantee that the build
tree contains exactly what it would if we were to start the build from a totally
clean directory each time. There are some downsides, however:

* In #800, it was discovered that this method has an unfortunate interaction
  with Docker. Docker apparently will mount many filesystems which `rename` will
  not work across.

* I have seen countless flaky failures on windows due to an attempt to remove a
  file that was still in use somehow. I've never been able to truly track down
  why these failures are happening, however.

The new system for managing output files is to build up a list of all known
files at the start of a build, whitelist any necessary files when the build is
being prepared, and then wipe out all unknown files right before the build
begins. This is not quite as close to the guarantee as the benefits reaped
before because on the second build all build files will still be in their final
output locations, they may just get updated as part of the build as well. This
seems like an acceptable compromise, however.

Closes #800
auto merge of #865 : alexcrichton/cargo/no-more-name, r=brson

With #843 and #839 coming around the bend soon, the original decision for
`--name` everywhere isn't making as much sense, for consistence this is renaming
these flags back to `--<target-name>` for the respective targets.
auto merge of #878 : alexcrichton/cargo/update-curl, r=brson

Closes #873
Improve zsh completion

Add test name completion from Cargo.toml

Add package name completion from Cargo.toml

Rename --name to --<target-name>
auto merge of #881 : eerden/cargo/zsh-completion-improvements, r=alexcrichton

Some small improvements:

Add test name completion from Cargo.toml

Add package name completion from Cargo.toml

Rename `--name` to `--\<target-name\>`
Fix Windows nightly links.

The homepage was linking to outdated nightlies. This had been fixed in the readme, but not on the actual website.
auto merge of #891 : ruud-v-a/cargo/patch-1, r=alexcrichton

The homepage was linking to outdated nightlies. This had been fixed in the readme, but not on the actual website.
Fix panic with plugins and build commands

This fixes a bug in cargo where target executables and libraries would be linked
to plugin native dependencies (not wanted!).

Closes #885
Tighten up the example for a build script
Merge branch 'lto' of https://github.com/BurntSushi/cargo into BurntSushi-lto
hide curl progress output
Polish off the LTO branch
auto merge of #896 : jgillich/cargo/patch-3, r=alexcrichton

Currently the command output looks like this on Fedora:

```
$ curl https://static.rust-lang.org/rustup.sh | sudo bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  9866  100  9866    0     0  39592      0 --:--:-- --:--:-- --:--:-- 39622[sudo] password for jakob: 
```
The first time I ran it, I didn't even realize it is asking for a password. By using the options for `silent` and `show-error`, we get this:

```
$ curl -sS https://static.rust-lang.org/rustup.sh | sudo bash
[sudo] password for jakob:
```
And errors are still displayed:

```
$ curl -sS https://example.invalid | sudo bash
curl: (6) Could not resolve host: example.invalid
[sudo] password for jakob: 
```
Directly use python’s urllib instead of curl in etc/dl-snapshot.py
auto merge of #899 : linkmauve/cargo/master, r=alexcrichton
One does not simply `make` Cargo

README fix with correct build instructions for building from source.
auto merge of #900 : steveklabnik/cargo/one_does_not_simply_make_cargo, r=alexcrichton

README fix with correct build instructions for building from source.