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).