Move generated tarballs under target/package

At the same time this commit renames the `.tar.gz` extension to `.crate`. This
helps our perception on Windows as we're not trying to leave them out in the
dark, and we'd also like the ability to modify the format later in the future.

Closes #777
auto merge of #798 : alexcrichton/cargo/issue-777, r=brson

At the same time this commit renames the `.tar.gz` extension to `.crate`. This
helps our perception on Windows as we're not trying to leave them out in the
dark, and we'd also like the ability to modify the format later in the future.

Closes #777
Fix cross compiling with a build script

Previously there was a mixup of where the build script was getting compiled into
as well as where the output was going to. This commit fixes the problems for
now, but still has room for improvement in the future.

Build scripts themselves are now unconditionally built into `target/build/..`
because they're compiled for the host platform. Their outputs are in
`target/$target/build/..` as expected.
Fix build scripts and double-compiled packages

This commit fixes support for build scripts in packages which are compiled for
both the host and target architectures. The support was previously hindered by
the fact that the build script was always invoked precisely once for the target
architecture unconditionally.

This adds support for build scripts themselves to depend on build scripts, and
everything should "just work" if build scripts respect their environment
variables.
auto merge of #813 : alexcrichton/cargo/build-cmd-cross-compile, r=brson

These commits contain a number of improvements to the usage of build scripts when cross compiling. A few erroneous assumptions were made to start out with, and this also fixes the long-standing bug of using build scripts in host packages (e.g. plugins and build dependencies).
Another fix for cross-compiled build scripts

Previously the host/target requirement for packages was not correctly calculated
as dependency edges to build dependencies weren't traversed by accident.
auto merge of #815 : alexcrichton/cargo/another-fix-oh-by-wait-i-verified-this-one-its-ok, r=alexcrichton

Previously the host/target requirement for packages was not correctly calculated
as dependency edges to build dependencies weren't traversed by accident.
Clarify the documentation on `cargo test`

Closes #812
Respect Target target vs host exe suffix distinction.
auto merge of #823 : DiamondLovesYou/cargo/master, r=alexcrichton
Update links to windows nightlies in the README
auto merge of #826 : tomaka/cargo/update-links-readme, r=alexcrichton
Don't look at custom build targets for output locs

They don't have any! We also care more about the other targets regardless.

Closes #821
Don't panic on unused overrides

This previously did a failing hashtable lookup when an `Option`-returning `get`
would suffice.
auto merge of #816 : alexcrichton/cargo/issue-812, r=brson

Closes #812
Cache build output in the target build directory

Placing it in the host directory may end up later on down the road causing a
spurious recompilation when one isn't necessary. I couldn't currently think of a
test case for this, as I don't think that this affects correctness.
auto merge of #828 : alexcrichton/cargo/issue-821, r=brson

They don't have any! We also care more about the other targets regardless.

Closes #821
Tweak doc style to match crates.io
auto merge of #829 : alexcrichton/cargo/less-paniks, r=brson

Unused overrides previously led to a panic, and build cmd outputs were cached in the *host* location instead of the *target* location.
auto merge of #840 : alexcrichton/cargo/new-docs, r=brson

Rendered version: http://alexcrichton.com/cargo/

Closes https://github.com/rust-lang/crates.io/issues/14