Added in Clone/TotalEq/TotalOrd/ToStr traits to all parts of btree.
Equals is now compact and uses vec's equals method.  Cmp compares
all elements on branches and leaves (Nodes).
auto merge of #11353 : alexcrichton/rust/improve-logging, r=brson

This will allow capturing of common things like logging messages, stdout prints
(using stdio println), and failure messages (printed to stderr).  Any new prints
added to libstd should be funneled through these task handles to allow capture
as well.

Additionally, this commit redirects logging back through a `Logger` trait so the
log level can be usefully consumed by an arbitrary logger.

This commit also introduces methods to set the task-local stdout handles:

* std::io::stdio::set_stdout
* std::io::stdio::set_stderr
* std::io::logging::set_logger

These methods all return the previous logger just in case it needs to be used
for inspection.

I plan on using this infrastructure for extra::test soon, but we don't quite
have the primitives that I'd like to use for it, so it doesn't migrate
extra::test at this time.

Closes #6369
auto merge of #11263 : niftynif/rust/btree, r=catamorphism

Apologies for junking up the feed with all of these separate pull requests.  I'm still getting the hang of git and will hopefully be doing less of this nonsense soon.  I opened up another PR and closed the one from earlier today because the first PR was coming from the wrong branch of my repo.
Anyway, this contains a fleshed-out implementation of TotalEq/TotalOrd/Clone/ToStr for the whole B-tree structure and relevant tests, integrating suggestions and comments from several community members.
r? @catamorphism
Fix leaking trait imports across modules

Turns out the pass in resolve was a little too eager to travel back up the
hierarchy chain when looking for trait candidates.

Closes #10465
rustc: De-indent portions of middle::resolve

It's a little prettier to look at now
std: Fill in all missing imports

Fallout from the previous commits
Fix remaining cases of leaking imports
stdtest: Fix all leaked trait imports
extratest: Fix all leaked trait imports
Fixup the rest of the tests in the compiler