Add HashSet::with_capacity_and_keys() function

This function can be use to create HashSets before the tls is
initialized.
Rewrite fileinput tests to use std::rt::io

These tests are being very flaky on the bots, and the reason is that files are
being created and then when attempted to get read they actually don't exist. I'm
not entirely sure why this is happening, but I also don't fully trust the
std::io implemention using @-boxes to close/flush/write files at the right time.

This moves the tests to using std::rt::io which is hopefully more robust and
something that we can actually reason about. Sadly, due to #8810, these tests
fail on windows, so they're all ignored on windows right now.
rustc: Fix cstack lint for default methods. Closes #8753
Convert rust_crate_map.cpp to Rust

Conflicts:
	src/libstd/rt/logging.rs
Fix rustpkg install for git repositories
auto merge of #9147 : catamorphism/rust/rustpkg-install-to-rust-path, r=catamorphism,metajack

r? @metajack Install to the first directory in the RUST_PATH if the user set a
RUST_PATH. In the case where RUST_PATH isn't set, the behavior
remains unchanged.

Closes #7402
auto merge of #8796 : brson/rust/cstack, r=pnkfelix
auto merge of #9087 : fhahn/rust/rust_crate_map, r=brson

This patch converts the rust_crate_map.cpp to Rust as mentioned at the end of #8880.
auto merge of #9148 : jakub-/rust/rustpkg-install-mkdir-p, r=catamorphism

Testing this is a little tricky as an intermediate temporary directory is only used for remote git repositories and therefore that path cannot be reliably exercised in the tests.
auto merge of #9141 : alexcrichton/rust/ignore-fileinput, r=catamorphism

These tests are being very flaky on the bots, and the reason is that files are
being created and then when attempted to get read they actually don't exist. I'm
not entirely sure why this is happening, but I also don't fully trust the
std::io implemention using @-boxes to close/flush/write files at the right time.

This moves the tests to using std::rt::io which is hopefully more robust and
something that we can actually reason about. Sadly, due to #8810, these tests
fail on windows, so they're all ignored on windows right now.
rustpkg: Cleanup