Fix travis builds
auto merge of #162 : rust-lang/cargo/fix-travis, r=tinyfix
Add bare-bones cross compilation support to cargo

This adds a new flag, --target, to the `cargo-build` command. This flag will
indicate that all output should be scoped under the `$triple` directory inside
of the output `target` directory. The compiler is invoked with `--target
$triple` and all custom build commands are passed `TRIPLE` if one is provided.
Implement a `plugin` flag for targets

If `plugin = true` is specified, then the target is considered a compiler plugin
which implies two separate properties:

* The library must be compiled as a dylib
* The library must be compiled for the host architecture
Update to master
Improve intra-target parallelism

With cross compilation soon on the horizon, it may be required to build a
library for both the host and target architectures. These two copies can
certainly be built in parallel. Additionally, all binaries produced by a package
can also be built in parallel, but are currently forced to be built
sequentially.

This commit improves this parallelism by allowing each job to create more work
before the package is considered built. Only after all targets have been built
is the new fingerprint written.
Refactor `Job` to its own module
Refactor Context into its own submodule
Refactor fingerprint logic out of cargo_rustc
Refactor the parallel job queue to its own module
Add some simple tests for cross compilation
Use command.env_set_all() instead of command.env()

Fixes build after
https://github.com/rust-lang/rust/pull/15353
auto merge of #166 : nielsle/cargo/command-env, r=alexcrichton

Quickfix for the build after https://github.com/rust-lang/rust/pull/15353
Finish plugin support

This commit implements full support for plugins by answering the question of
whether any target needed as a plugin or needed as a target dependency. This
commit builds on the previous abstractions to enable parallel compilation
wherever possible.
auto merge of #167 : alexcrichton/cargo/cross-compile, r=wycats

This also refactored many things along the way, I would recommend reading each commit individually rather than them all as a whole.

Closes #119
list `clean` command in help
auto merge of #169 : cburgdorf/cargo/name_clean, r=alexcrichton

There are other unnamed commands like `verify-project` but I'm unsure if they are **not** listed on purpose because they should be used directly by the user less frequently. However, the clean command seems like a command that should be listed here.

Not sure about the wording though. It could be more abstract like *remove build artifacts* but given it's current behavior I think *remove target directory* is somehow straight forward, too.
Add support for examples
Add support for external tests
Do not run examples during 'cargo test'