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.
Ensure env vars are set for cargo-doc

This erroneously used util::process instead of the custom process function in
the cargo_rustc module.
auto merge of #330 : alexcrichton/cargo/fix-cargo-doc2, r=wycats

This erroneously used util::process instead of the custom process function in
the cargo_rustc module.
auto merge of #302 : alexcrichton/cargo/doc-test, r=wycats

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.

Closes #334
Remove Location, use Url everywhere

Now that rust-url supports windows paths in URLs, this commit jettisons the
janky Location enum in favor of just using Url everywhere.
Remove the update_remotes flag entirely

This will inadvertently fix #337 as no lockfile will imply that all dependencies
are not precise, and will hence be fetched.
Unconditionally write Cargo.lock

Otherwise `cargo-update` ends up not doing much because all sources are
considered equal regardless of their precision.
Update rust-url with a contained bugfix