Remove glob dependency
auto merge of #142 : rust-lang/cargo/new-names, r=alexcrichton

This PR moves Cargo over to the new naming based on [RFC 35](https://github.com/rust-lang/rfcs/blob/master/complete/0035-remove-crate-id.md).

* You should no longer use `#[crate_name]` or `#[crate_id]` in any crate managed by Cargo.
* You no longer need a `[[lib]]` section in your `Cargo.toml` if you name your library `src/lib.rs`.
* You no longer need a `[[bin]]` section in your `Cargo.toml` if you name your library `src/main.rs`.
* You can include multiple `[[bins]]` in `src/bin/*.rs` and Cargo will treat them as if they were specified via `[[bin]]`.

This commit does not yet add support for `-C metadata` or `-C extra-file-name`, but that is coming soon.
cargo clean. resolves #51
Ensure no more binaries are checked in

Closes #58
auto merge of #124 : alexcrichton/cargo/no-more-binaries, r=wycats

Closes #58
auto merge of #141 : jdeseno/cargo/cargo-clean, r=alexcrichton

Adds cargo-clean sub-command. Would address Issue #51 if this PR is merged.
Ignore lib directory for exes check

Apparently older versions of git report all contents of submodules in the
ls-files command!
auto merge of #147 : alexcrichton/cargo/ls-files, r=wycats

Apparently older versions of git report all contents of submodules in the
ls-files command!
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