Canonicalize URLs when hashing sources
Don't look inside target/ for sub-packages

When cargo is building itself, it just ends up getting confused because the test
directory is in this location.
Fix failure on second run of 'cargo test'

Generate the right target filename for rlibs built in test
mode so that they are correctly moved back out of the old-root
directory.
Add regression test for running `cargo test` twice
auto merge of #232 : bkoropoff/cargo/fix-repeated-cargo-test, r=alexcrichton

Generate the right target filename for rlibs built in test
mode so that they are correctly moved back out of the old-root
directory.
auto merge of #222 : alexcrichton/cargo/no-cargo-toml-in-target, r=wycats

When cargo is building itself, it just ends up getting confused because the test
directory is in this location.
auto merge of #224 : alexcrichton/cargo/canonical-hash, r=wycats

This should prevent some weird bugs where if you have slightly different sources that you occasionally have to recompile them when cargo switches between one or the other (thinking they're different)
Bootstrap cargo with cargo
Implement `cargo-{upload,login}` commands

The cargo-upload command will take the local package and upload it to the
specified registry. The local package is uploaded as a tarball compressed with
gzip under maximum compression. The host to upload to is specified, in order of
priority, by a command line `--host` flag, the `registry.host` config key, and
then the default registry.

Uploading requires a token from the api server, and this token follows the same
config chain for the host except that there is no fallback. To implement login,
the `cargo-login` command is used. With 0 arguments, the command will request
that a site be visited for a login token, and with an argument it will set the
argument as the new login token.

The support for these commands is quite bare-bones at the moment and is not very
user-friendly. The purpose of this is to lay the groundwork for future
improvements.