Update to rust master

rust-lang/rust#19253 and rust-lang/rust@25f8051 have introduced changes
to the namespacing within the std::collections::hash_map, breaking some
of Cargo code which imported these.

rust-lang/rust@cf350ea, implementing changes proposed by RFC #344, have
also broken some code which relies on hash_set::SetItems (now renamed to
hash_set::Iter).

This commit fixes the incompatibilities: imports of
std::collections::hash_map::{Occupied, Vacant} have been replaced by
imports of std::collections::hash_map::Entry::{Occupied, Vacant} and one
instance where the SetItems has been used was replaced by the proper
usage of Iter.
Bump required rust version

Latest changes require that we build with a later Rust nightly
Allow the location of `~/.cargo` to be overridden via `CARGO_HOME` env var.

I intend to use this to allow many copies of the Rust toolchain to coexist.
auto merge of #1084 : brson/cargo/home, r=alexcrichton

...ar.

I intend to use this to allow many copies of the Rust toolchain to coexist.

My project for managing Rust toolchains: https://github.com/brson/multirust
Bump version numbers

Updated to use the latest 2014-12-23 nightly and newest versions of
crates url and docopt.rs
Migrate to rustc-serialize

As per rust-lang/rust@b04bc5c, move all Encodable and Decodable deriving
modes to RustcEncodable and RustcDecodable, and also extern the
rustc-serialize crate instead of the former serialize one.
Update references to renamed traits

As per rust-lang/rust@f8cfd24, rename references to slice::Items to
slice::Iter and slice::MutItems to slice::IterMut
Handle from_utf8 new return type

As per rust-lang/rust@9b99436, the return type of from_utf8 has been
changed from Option to Result. Consequently, update code which relied on
this return type to work with Ok(...) and Err(...) instead of Some(...)
and None
Fix fn type mismatch error

rustc complains that we cannot assign two different fn's to a single
object within an if-else block. I was not able to figure out what causes
this; so deferring the execution of the particular function is a
reasonable fallback. Not very elegant and should be changed to something
with less boilerplate
Update dependency info

Bump to newest versions of several libraries
Add Levenshtein distance implementation

Copy lev_distance.rs verbatim from Rust since str::lev_distance has been
deprecated by rust-lang/rust@9b99436 with no replacement and change code
to use it instead of the deprecated function
Update Cargo.lock for newest dependencies
Add rustc-serialize dependency to registry
Fix tests
Break long lines

...
Fix deprecation warnings

Apparently .repeat() for str and .into_string() have been deprecated,
replace them with suggested alternatives
Avoid logic duplication

As suggested by @alexcrichton, reverted back to the old way of handling
both Job::new and Job::noop that avoids ugly constructs and code
duplication
Use std::iter repeat to generate indentation level
Temporary fix for tests

Two tests (test_with_deep_lib_dep and lib_with_standard_name) fail due
to a bug in rustdoc (see rust-lang/rust#20183) so temporarily changing
these so they pass. Be sure to change it back when the fix lands in the
current rust nightly
auto merge of #1085 : geomaster/cargo/master, r=alexcrichton

rust-lang/rust#19253 and rust-lang/rust@25f8051 have introduced changes
to the namespacing within the std::collections::hash_map, breaking some
of Cargo code which imported these.

rust-lang/rust@cf350ea, implementing changes proposed by RFC #344, have
also broken some code which relies on hash_set::SetItems (now renamed to
hash_set::Iter).

This PR fixes the incompatibilities: imports of
std::collections::hash_map::{Occupied, Vacant} have been replaced by
imports of std::collections::hash_map::Entry::{Occupied, Vacant} and one
instance where the SetItems has been used was replaced by the proper
usage of Iter.