dlist: Fix bug in DList::merge

Did not properly allow runs from the `other` list to be merged in. The
test case was using a wrong expected value.

Edited docs for merge so they explain more clearly what it does.

Also make sure insert_ordered is marked pub.
dlist: Implement DoubleEndedIterator and use for .iter() and .rev_iter()
dlist: Use DoubleEndedIterator for .consume_rev_iter()
dlist: Use a DoubleEndedIterator for .mut_iter() and .mut_rev_iter()

Unify the mutable iterators too. Switch the ListInsertion trait to use
method .insert_next() and .peek_next() for list mutation. .insert_next()
inserts an element into the list that will not appear in iteration, of
course; so the length of the iteration can not change during iteration.
cmp: Use default methods in trait Ord, only require Ord::lt

It will be simpler to implement only one method for Ord, while we also
allow implementing all four Ord methods for semantics or performance
reasons.

We only supply three default methods (and not four), because don't have
any nice error reporting for the case where at least one method must be
implemented, but it's arbitrary which.
auto merge of #7734 : alexcrichton/rust/issue-3395, r=sanxiyn

Also ends up fixing one case in libstd. 

Closes #3395
Squirrel away the JIT contexts into TLS when done

This prevents attempting to run deallocated code (which is no longer present
always)
Merge pull request #7735 from blake2-ppc/dlist

dlist: Use DoubleEndedIterator
Avoid return blocks that have only a single predecessor

Currently, we always create a dedicated "return" basic block, but when
there's only a single predecessor for that block, it can be merged with
that predecessor. We can achieve that merge by only creating the return
block on demand, avoiding its creation when its not required.

Reduces the pre-optimization size of librustc.ll created with --passes ""
by about 90k lines which equals about 4%.
Avoid empty "static_allocas" blocks

When there are no allocas, we don't need a block for them.
Avoid empty "else" blocks

If an "if" expression has no "else", we don't have to create an LLVM
basic block either.
auto merge of #7765 : blake2-ppc/rust/ord-default-methods, r=huonw

Rust will allow to supply default methods for all four methods, but we
don't have any nice error reporting for the case where at least one
method must be implemented, but it's arbitrary which.

So in this case, we require `lt`, but allow implementing the others if needed.
Add print! and println! macros. Closes #7653.
Add CONTRIBUTING.md and RELEASES.txt to release tarball. Closes #7561.
auto merge of #7775 : poiru/rust/issue-7653, r=huonw

This closes #7653.
Use concrete types in glue functions

We used to have concrete types in glue functions, but the way we used
to implement that broke inlining of those functions. To fix that, we
converted all glue to just take an i8* and always casted to that type.

The problem with the old implementation was that we made a wrong
assumption about the glue functions, taking it for granted that they
always take an i8*, because that's the function type expected by the
TyDesc fields. Therefore, we always ended up with some kind of cast.

But actually, we can initially have the glue with concrete types and
only cast the functions to the generic type once we actually emit the
TyDesc data.

That means that for glue calls that can be statically resolved, we don't
need any casts, unless the glue uses a simplified type. In that case we
cast the argument. And for glue calls that are resolved at runtime, we
cast the argument to i8*, because that's what the glue function in the
TyDesc expects.

Since most of out glue calls are static, this saves a lot of bitcasts.
The size of the unoptimized librustc.ll goes down by 240k lines.
auto merge of #7763 : dotdash/rust/empty_blocks, r=pcwalton

These commits remove a bunch of empty or otherwise unnecessary blocks, reducing the size of the pre-optimization IR and improving its readability. `librustc.ll` created with `--passes ""` shrinks by about 120k lines which equals about 5% of the total size.
remove new man pages on make uninstall
rustpkg: Implement `uninstall` and `list` commands
rustpkg: Address review comments from cmr