Blow away corrupt database repos

If a repository is corrupt, blow it away entirely and start from scratch instead
of returning an error.
Dedup overrides by name

Overrides are only queried by name, and it's possible for multiple to show up,
and just pick the first one.

Closes #461
Update docopt to fix -- option parsing

Closes #492
Don't run doc tests for `cargo bench`

They're not really related to benchmarks!

Closes #486
Slim down the `cargo --list` test

This test has been flaky on the bots for quite some time now, and the cause has
now been discovered. The root cause of the failure is that the execve for the
`cargo --list` command was failing with ETXTBUSY. In querying the manpage, this
means:

    Executable was open for writing by one or more processes.

This error can be explained by the following trace:

1. Thread A, running the `cargo --list` test, opens the destination executable
   for writing because it's copying the current executable into a different
   location.
2. Thread B, some other test, forks the process. The file descriptor of the
   destination executable of thread A is now duplicated in this process.
3. Thread A closes all files and such, and then goes to fork/exec
   `cargo --list`.
4. Thread B has not had time to close all its descriptors. so it still has the
   executable open for writing, causing the `execve` of thread A to fail.

This commit just removes these tested portions of the test, only testing that
cargo probes PATH.
auto merge of #495 : alexcrichton/cargo/issue-492, r=brson

Closes #492
auto merge of #499 : alexcrichton/cargo/issue-486, r=brson

They're not really related to benchmarks!

Closes #486
auto merge of #500 : alexcrichton/cargo/fix-flaky-test, r=brson

This test has been flaky on the bots for quite some time now, and the cause has
now been discovered. The root cause of the failure is that the execve for the
`cargo --list` command was failing with ETXTBUSY. In querying the manpage, this
means:

    Executable was open for writing by one or more processes.

This error can be explained by the following trace:

1. Thread A, running the `cargo --list` test, opens the destination executable
   for writing because it's copying the current executable into a different
   location.
2. Thread B, some other test, forks the process. The file descriptor of the
   destination executable of thread A is now duplicated in this process.
3. Thread A closes all files and such, and then goes to fork/exec
   `cargo --list`.
4. Thread B has not had time to close all its descriptors. so it still has the
   executable open for writing, causing the `execve` of thread A to fail.

This commit just removes these tested portions of the test, only testing that
cargo probes PATH.
auto merge of #501 : alexcrichton/cargo/issue-480, r=brson

If a repository is corrupt, blow it away entirely and start from scratch instead
of returning an error.

Closes #480
cargo/new: add `--travis` flag
ffix build on nightly rust
Generate a lockfile sooner in `cargo build`

It's quite annoying if you update a dependency, but it takes you awhile to get
the dependency building. Previously the dependency graph would have to be
updated each time because the lockfile was only written *after* a successful
build.

Other tools like `cargo generate-lockfile` will already generate a lockfile at
any time, so just make it easier by moving it up in the compilation process.
auto merge of #506 : alexcrichton/cargo/sooner-lockfile, r=wycats

It's quite annoying if you update a dependency, but it takes you awhile to get
the dependency building. Previously the dependency graph would have to be
updated each time because the lockfile was only written *after* a successful
build.

Other tools like `cargo generate-lockfile` will already generate a lockfile at
any time, so just make it easier by moving it up in the compilation process.
cargo/new: add test for `--travis flag; also update Cargo.lock
Implement manifest profiles

For documentation, see the included documentation in the commit.
Re-enable passing -g to rustc

Now that there is a way to disable debuginfo for a build, we can go back to
passing it by default. Any bugs in debuginfo will get weeded out by specifying
`debug = false` in the profile.
auto merge of #507 : alexcrichton/cargo/profiles, r=brson

For documentation, see the included documentation in the commit.
Turn --git on by default for `cargo-new`.

This adds a command-line --no-git option to disable this behavior, as well as
adding a global config section for `git = false`. While I was at it I write some
documentation for the configuration format that cargo uses.
auto merge of #470 : alexcrichton/cargo/cargo-new-git, r=brson

This adds a command-line --no-git option to disable this behavior, as well as
adding a global config section for `git = false`. While I was at it I write some
documentation for the configuration format that cargo uses.
auto merge of #474 : alexcrichton/cargo/issue-461, r=wycats

Overrides are only queried by name, and it's possible for multiple to show up,
and just pick the first one.

Closes #461 

r? @wycats -- I'm not convinced this is correct