Add HashSet::with_capacity_and_keys() function

This function can be use to create HashSets before the tls is
initialized.
implement raw pointer comparisons in librustc

This is mostly for consistency, as you can now compare raw pointers in
constant expressions or without the standard library.

It also reduces the number of `ptrtoint` instructions in the IR, making
tracking down culprits of what's usually an anti-pattern easier.
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.
Parse underscores in identifiers for format!

Closes #9119
auto merge of #9140 : alexcrichton/rust/issue-9119, r=huonw

Closes #9119
auto merge of #9136 : thestinger/rust/ptr, r=alexcrichton

This is mostly for consistency, as you can now compare raw pointers in
constant expressions or without the standard library.

It also reduces the number of `ptrtoint` instructions in the IR, making
tracking down culprits of what's usually an anti-pattern easier.
rustpkg: Support sub-package-IDs

Package IDs can now refer to a subdirectory of a particular source
tree, and not just a top-level directory with a src/ directory as its
parent.

For example, referring to the package ID a/b/c/d , in workspace W,
if W/src/a is a package, will build the sources for the package in
a/b/c/d (and not other crates in W/src/a).

Closes #6408
auto merge of #9146 : catamorphism/rust/rustpkg-sub-package-ids, r=brson,catamorphism

r? @brson Package IDs can now refer to a subdirectory of a particular source
tree, and not just a top-level directory with a src/ directory as its
parent.

For example, referring to the package ID a/b/c/d , in workspace W,
if W/src/a is a package, will build the sources for the package in
a/b/c/d (and not other crates in W/src/a).

Closes #6408
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
std: rename Option::unwrap_or_default() to unwrap_or()
std: add default implementations to HashMap
std: add default implementations to Option
libsyntax: add Default implementation to OptVec
std: Add Option.{result_or_default,or_default} that uses Default
std: Add Default implementation for vecs
std: Add Option.unwrap_or_else and a couple tests