[WIP] Generate Cargo.lock on successful resolve
WIP
ICE
Successfully roundtrip the lockfile

This writes out and reads the lockfile, but it does nothing to verify
that the lockfile is still up to date, so it's not actually ready to be
used.
Fix all tests and rebase conflicts

This rebases the lockfile branch to master and updates all code necessary to get
the tests passing again.
Use precise if it's there
Use sources from the lockfile

The sources in the lock file contain precise information about git deps so we
want them over the non-precise versions in the source.
Be sure to not emit a lone `?` in a URL
Optimize freshness of git repos

This commit cuts down on the number of invocations of `git` to make the "happy
path" of an up-to-date git repo much smoother. The precise information is also
applied from the lockfile to speed things up.
Avoid executing git in fingerprint()

We already discovered the local rev earlier on, so there's no need to rediscover
it through git.
Add a small profiling framework

This should help aid in debugging slow parts of cargo by setting the
CARGO_PROFILE environment variable.
Touch up some documentation around commands
Implement cargo-update
Ensure update updates all shared deps
Go back to manually stringifying resolve
auto merge of #301 : alexcrichton/cargo/lockfile, r=wycats

This PR is a series of commits building off the `lockfile` branch which finishes the work on the lockfile as well as implementing the `cargo-update` command.

This PR deprecates the `-u` flag in favor of the `cargo update` command.
Make the dependency queue entirely generic

This paves the way for future intra-package parallelism as opposed to just
inter-package parallelism.
Power the TaskPool with a sync channel

This rate limits the jobs entering the pool to ensure that the number of
pending jobs is actually close to the number of cores. The current behavior is
to print all pending jobs, even when they're not executing, which may be
confusing.
Prepare for per-target fingerprints

This commit refactors all related infrastructure for the cargo_rustc module to
move the granularity of fingerprints from packages to targets. This involved
heavily modifying the `JobQueue` structure to understand a finer-grained target
for dirtiness propagation and dependency management, and then dealing with
fallout in the main module.

The fingerprint module has been refactored to support a per-target fingerprint.
A fallout of this change is that each build step has its own fingerprint,
including the custom build command step. This will be implemented in a future
commit.

As fallout of this reorganization, we are now exploiting the maximal parallelism
within packages themselves whereas before we were only partially parallelizing.
No new features were added as part of this commit, so I just ensured that all
the tests ran.
Implement per-target fingerprints

This commit refines the granularity of fingerprints from packages to targets,
building on the existing infrastructure. All invocations of rustc now include
the --dep-info flag which will emit makefile-like dependency information. This
information is then parsed later on to determine if all the files are fresh.

The purpose of this commit is to refine the set of files which indicate that a
target needs to be re-built. Before this commit if you modified a test it would
rebuild the entire library, but after this commit it only rebuilds the relevant
test.

Closes #214
Closes #289