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
rustpkg: Search RUST_PATH properly for dependencies, and add a test for recursive dependencies

Closes #8524
auto merge of #9132 : catamorphism/rust/rustpkg-recursive-deps, r=catamorphism,metajack

r? @metajack ...recursive dependencies

Closes #8524
rustpkg: Install to RUST_PATH

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 #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
Stop using newtypes in rt::io::buffered

This is a workaround for #9155. Currently, any uses of BufferedStream
outside of libstd ICE.
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.
Improve the local_data docs slightly

Remove references to local_data::Key and only mention the macro for how to
construct new keys into local data.
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.
Translate nested items in default methods

Closes #9123
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.
std::rt::io: Fix file I/O on Win32

It was broken on win32 because of header inconsistency.
set sret attribute as needed on call instructions

Since function pointers do not carry along the function attributes with
them in the type, this needs to be set on the call instruction itself.

Closes #9152
rustc/rustpkg: Use a target-specific subdirectory in build/ and lib/

As per rustpkg.md, rustpkg now builds in a target-specific
subdirectory of build/, and installs libraries into a target-specific
subdirectory of lib.

Closes #8672
Move glob tests to a run-pass test

The normal unit tests cannot change the current working directory because it
messes with the other tests which depend on a particular working directory.