Link the lifetimes of regions resulting from borrows of the
contents of other borrowed pointers to the lifetimes of the
borrowed value.  Fixes #3148.

r=catamorphism
Integrate vec patterns into borrow checker.

The tail portion of the pattern effectively borrows a vector,
but the borrow checker knew nothing about this.

r=catamorphism
Detect "// WARN" in tidy and print out, well, a warning!  Useful
for notating FIXME-style-situations that you want to be reminded
of before you commit.

r=catamorphism
Make tidy actually work

r=catamorphism
Extend region guarantor logic to handle autoref, which will
be necessary for reborrowing.

r=catamorphism
Remove bounds from type decl of smallintmap

r=brson
Add to_str() definitions for some AST types

r=brson
Do not try to encode/decode inference types, should not be necessary

r=brson
Refactor to make inference code around unification more readable

r=brson
rename assign to coerce, remove some bad copies

r=brson
Rewrite the coercion code to be more readable, more sound, and to reborrow when
needed.

Regarding soundness: there was a subtle bug in how it was done before; see the
compile-fail test for an example.

Regarding reborrowing: reborrowing allows mut and const
slices/borrowed-pointers to be used with pure fns that expect immutable data.

r=brson
remove hacks now that #3148 is fixed

r=brson
remove unused variable
loan: Track whether or not the current path owns the data being
lent.  We can be more liberal with respect to the scope of the loan
if we do not own the data being lent, which used to be impossible
but can now occur with `&mut`.

r=pcwalton
Address @catamorphism's comments regarding docs
Change "// WARN" in tidy to "// NOTE" as requested by @catamorphism
libstd: Remove "dual impls" from the language and enforce coherence rules.

"Dual impls" are impls that are both type implementations and trait
implementations. They can lead to ambiguity and so this patch removes them
from the language.

This also enforces coherence rules. Without this patch, records can implement
traits not defined in the current crate. This patch fixes this, and updates
all of rustc to adhere to the new enforcement. Most of this patch is fixing
rustc to obey the coherence rules, which involves converting a bunch of records
to structs.