Add "--list" option to `cargo`, that shows lists of installed (sub)commands by searching
directories for executables with name cargo-*.
Update rust-encoding

Closes #357
Fix updating git sources a new lockfile is committed

This is the actual fix for #345
Fix `cargo clean` when not in the root dir

Closes #361
Support --target with `cargo test`

Closes #356
Disable doctests separately from tests

This adds a `doctest = false` option to the `Cargo.toml` config for a target to
disable doc tests for the target. Notably `test = false` does not disable this
as it is separately toggleable.

Closes #353
Don't pull in dev-deps for `cargo build`

Also don't pull them in for `cargo doc`, but continue to pull them in for
`cargo run` and `cargo test`.

Closes #351
Don't always print an error on test failures

Only print a failure if the command didn't have an exit status. Also, clarify
the failure message in the case that an exit was detected but it was not a
successful status.

Closes #350
Add a configure option to disable cross-tests

The tests are enabled by default and must be opted out of.

Closes #346
Merge commit 'xanxys/master' into fix-some-bugs
Fix a flaky test (due to hashes changing)
Take a different strategy than ^{object}

Apparently that syntax only exists in more recent versions of git, not older
versions (like those present on the buildbots).
auto merge of #363 : alexcrichton/cargo/fix-some-bugs, r=wycats

This also pulls in #316 to land everything at the same time. The major fix is "Fix updating git sources when a new lockfile is committed", and everything else was just issues that had accumulated over time. Once this has landed (may take some finesse), I'll make a new snapshot so cargo can actually start properly updating itself.