Support use of namespaced environment variables based on target triplet and BUILD_KIND

This is a replacement for https://github.com/rust-lang/cargo/pull/1004 and depends on  http://github.com/rust-lang/cargo/pull/1008