Add a variant of home_for_io that consumes the handle. Refactor out common parts of the home_for_io variants.
Split out starting a listener from accepting incoming connections.

The Listener trait takes two type parameters, the type of connection and the type of Acceptor,
and specifies only one method, listen, which consumes the listener and produces an Acceptor.

The Acceptor trait takes one type parameter, the type of connection, and defines two methods.
The accept() method waits for an incoming connection attempt and returns the result.
The incoming() method creates an iterator over incoming connections and is a default method.

Example:

let listener = TcpListener.bind(addr); // Bind to a socket
let acceptor = listener.listen(); // Start the listener
for stream in acceptor.incoming() {
    // Process incoming connections forever (or until you break out of the loop)
}
std::iterator: Introduce trait ExactSizeHint

The trait `ExactSizeHint` is introduced to solve a few small niggles:

* We can't reverse (`.invert()`) an enumeration iterator
* for a vector, we have `v.iter().position(f)` but `v.rposition(f)`.
* We can't reverse `Zip` even if both iterators are from vectors

`ExactSizeHint` is an empty trait that is intended to indicate that an
iterator, for example `VecIterator`, knows its exact finite size and
reports it correctly using `.size_hint()`. Only adaptors that preserve
this at all times, can expose this trait further. (Where here we say
finite for fitting in uint).
std::iterator: Implement .next_back() for Zip

Let Zip be double-ended when both its children have the ExactSizeHint
trait.
std::iterator: Add tests for .next_back() on Zip and Enumerate
std: Implement .rposition() on double-ended iterators with known size

This is a generalization of the vector .rposition() method, to all
double-ended iterators that have the ExactSizeHint trait.

This resolves the slight asymmetry around `position` and `rposition`

* position from front is `vec.iter().position()`
* position from the back was, `vec.rposition()` is now `vec.iter().rposition()`

Additionally, other indexed sequences (only `extra::ringbuf` I think),
will have the same method available once it implements ExactSizeHint.
std::str: Use reverse enumerate and .rposition

Simplify code by using the reversibility of enumerate and use
.rposition().
std::select: Use correct indices from the front

Caught a bug where .enumerate() was used on a reverse iterator. The
indices should be counted from the front here (bblum confirms).
std::iterator: Add back .rposition() test
std::iterator: Use ExactSize, inheriting DoubleEndedIterator

Address discussion with acrichto; inherit DoubleEndedIterator so that
`.rposition()` can be a default method, and that the nische of the trait
is clear. Use assertions when using `.size_hint()` in reverse enumerate
and `.rposition()`
std/extra: Add ExactSize for Bitv, DList, RingBuf, Option iterators
Implement BufReader
Allow _ param name in trait default method for #8468.
Regression test for #8468.
Raise the file descriptor limits when running compiletest

We already do this for libstd tests automatically, and compiletest runs into the
same problems where when forking lots of processes lots of file descriptors are
created. On OSX we can use specific syscalls to raise the limits, in this
situation, though.

Closes #8904
Don't have format! move out of local variables
add type name to the tydesc

Closes #8926
repr: add very basic support for functions

Closes #8917
Incorporate review feedback.  Fix #8468.
auto merge of #8940 : pnkfelix/rust/fsk-8468-allow-underscore-paramname-in-trait-default-method, r=alexcrichton

Fix #8468.  (Though the right answer in the end, as noted on the dialogue on the ticket, might be to just require trait methods to name their parameters, regardless of whether they have a default method implementation or not.)