Refactor PackageId.namespace -> source_id
emit -C extra-filename and metadata
Fix registry query fn
auto merge of #150 : rust-lang/cargo/source-id-cleanup, r=alexcrichton

This PR is a stepping stone towards eventual use of `--extern`, which will allow multiple packages with the same name to exist in the transitive dependency graph.
Fix testing bins with lib deps

If a package had both bin and lib deps, `cargo test` was not building the `lib`
dependency when building the bins with `--test`. This commit adds an extra
"test" profile (not compiled with --test) for situations such as this which is
filtered out normally but kept around for the `cargo test` case.
Fix --release not compiling upstream deps with -O3

This touches up the filtering logic to ensure that upstream dependencies as well
as local dependencies are built with optimizations when `cargo build --release`
is used.
Disable passing -g for now
Resolve more correctly and add --extern

This commit adds support for passing --extern to dependencies. It allows
multiple copies of the same named dependency in the system, as long as
they come from different repos.
Fixed a number of bugs related to rustc building

Most notably, `resolve` now takes the root, so it can properly link the
root package with its dependencies (which is required to build the
--externs for the root package).
Add some unit tests
Remove hardcoding
ToStr::to_str -> ToString::to_string

Conflicts:
	src/cargo/core/resolver.rs
	src/cargo/ops/cargo_rustc.rs
Make README nightlies links clickable
More updates to master
Add -u to `cargo test`
impl Show for Profile
No need for a TempDir, use `-` as input
Fix filtering for test deps

This fixes `cargo test` to only test the *local* package
Tighten up some tests
Fix some tests