Robustly run binaries and tests after compilation

These were previously just run by executing the raw binary, but this didn't
ensure that any of the necessary paths were in the dylib search path for the
host platform.

This commit enhances the return type of `compile_targets` to have information
about the result of compilation, along with the ability to spawn correctly
configured processes.

This primarily fixes `cargo test` and `cargo run` whenever dynamic dependencies
are involved, but it also fixes the two commands whenever there's a native
dynamic dependency involved as well.
Don't match the output of the submodule test

Apparently really old versions of git ignore --quiet and print things anyway,
causing the test to fail on the linux buildbot.
auto merge of #338 : alexcrichton/cargo/fix-dylib-tests, r=wycats
Fix --extern for doc tests for the local crate.

Closes #340
Verbosely say what's happening during doc tests

Or at least verbosely say when -v is provided.
Make sure version env vars are always present

They were accidentally left out of the `rustdoc --test` stage which caused
crates not to be able to be compiled.
auto merge of #341 : alexcrichton/cargo/doc-test-tweaks, r=wycats
Register new snapshots
auto merge of #347 : alexcrichton/cargo/snapshots, r=new
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)