Ensure manifest paths are absolute paths

Closes #299
auto merge of #303 : alexcrichton/cargo/issue-299, r=wycats

Closes #299
Deal with different encodings of Cargo.lock

On windows, git will check out files with different line endings causing the
same serialized resolve to be resolved slightly differently. Instead of
comparing contents, this commit alters by testing whether the decoded resolve is
equivalent to the to-be-written resolve and only aborts writing if the two are
equal.
auto merge of #314 : alexcrichton/cargo/hurray-for-windows, r=wycats

On windows, git will check out files with different line endings causing the
same serialized resolve to be resolved slightly differently. Instead of
comparing contents, this commit alters by testing whether the decoded resolve is
equivalent to the to-be-written resolve and only aborts writing if the two are
equal.
Register new snapshots

These snapshots have the lockfile plus the per-target fingerprints. This also
additionally adds a lockfile to the repo for all our deps.
auto merge of #309 : alexcrichton/cargo/snapshots, r=wycats

These snapshots have the lockfile plus the per-target fingerprints. This also
additionally adds a lockfile to the repo for all our deps.
Use same method to load manifest with doc sub-command
auto merge of #317 : jdeseno/cargo/doc-manifest-path, r=alexcrichton
Update the lockfile when deps are modified

Closes #314
auto merge of #323 : alexcrichton/cargo/issue-314, r=wycats

Closes #314
Fix running tests using git on systems with customized git templates

I customized my git repo template to default to the standard pre-commit
hook that checks for e.g. trailing whitespace and refuses to commit if
any trailing whitespace was found. This causes some of cargo's tests to
fail.

To be independent of the user's git template, create the repo for the
test without using any, by specifying an empty template.
auto merge of #325 : dotdash/cargo/git_no_template, r=alexcrichton

I customized my git repo template to default to the standard pre-commit
hook that checks for e.g. trailing whitespace and refuses to commit if
any trailing whitespace was found. This causes some of cargo's tests to
fail.

To be independent of the user's git template, create the repo for the
test without using any, by specifying an empty template.
Refactor cargo_test into an ops module

The logic for doc tests will get a little complex, so this is moved to aseparate
module instead of inside the executable.
Implement doc tests

Whenever `cargo test` is run and a testable library target is available, the doc
tests will be run. This can be opted out of with `test = false` as usual.

This is currently not super useful due to rust-lang/rust#16157, but I expect
that to be merged soon. In the meantime examples will need to `extern crate foo`
explicitly.