custom_build: build output goes in the directory for the req, not hard coded to Target

This broke crossbuilds that had Host deps that used custom build
scripts, typically resulting in a failure to link (due to bad
relocations or symbols) the final executable or library.

Probably should have rustc check when generating an rlib that all the
containing objects have the appropriate arch.
Merge branch 'fix-custom-build-cross' of https://github.com/jmesmon/cargo into pr-1012
Add a test for PR #1012
auto merge of #1060 : alexcrichton/cargo/pr-1012, r=alexcrichton