std::iter: Introduce .by_ref() adaptor

Creates a wrapper around a mutable reference to the iterator.

This is useful to allow applying iterator adaptors while still
retaining ownership of the original iterator value.

Example::

   let mut xs = range(0, 10);
   // sum the first five values
   let partial_sum = xs.by_ref().take(5).fold(0, |a, b| a + b);
   assert!(partial_sum == 10);
   // xs.next() is now `5`
   assert!(xs.next() == Some(5));
std::rt::uv::net: Handle `read_start` error

cc #9605
std::rt: Add NotConnected to IoErrorKind
rt::io::net::tcp: Fix eof_twice tests on Win32

cc #8811
extra: implement Encodable/Decodable for Uuid
fix bounds checking failure message

casting the `uint` to an `int` can result in printing high values as
negative intege
fix overflow on bounds checks

Closes #9020
use element count in slices, not size in bytes

This allows the indexing bounds check or other comparisons against an
element length to avoid a multiplication by the size.
remove executable flag from source file
rename `base_and_len` -> `base_and_byte_len`
introduce `base_and_len` fns for element length
auto merge of #9885 : thestinger/rust/vector, r=brson

The goal here is to avoid requiring a division or multiplication to compare against the length. The bounds check previously used an incorrect micro-optimization to replace the division by a multiplication, but now neither is necessary *for slices*. Unique/managed vectors will have to do a division to get the length until they are reworked/replaced.
auto merge of #9634 : blake2-ppc/rust/by-ref-iter, r=thestinger

std::iter: Introduce .by_ref() adaptor

Creates a wrapper around a mutable reference to the iterator.

This is useful to allow applying iterator adaptors while still
retaining ownership of the original iterator value.

Example::

    let mut xs = range(0, 10);
    // sum the first five values
    let partial_sum = xs.by_ref().take(5).fold(0, |a, b| a + b);
    assert!(partial_sum == 10);
    // xs.next() is now `5`
    assert!(xs.next() == Some(5));

---

This adaptor requires the user to have good understanding of
iterators or what a particular adaptor does. There could be some
pitfalls here with the iterator protocol, it's mostly the same issues
as other places regarding what happens after the iterator
returns None for the first time.

There could also be other ways to achieve the same thing, for
example Implementing iterator on `&mut T` itself:
`impl <T: Iterator<..>> Iterator for &mut T`  but that would only
lead to confusion I think.
auto merge of #9833 : alexcrichton/rust/fixes, r=brson

Commits have all the fun details
uuid: serialize test and documentations
auto merge of #9721 : klutzy/rust/uv-net-read-fix, r=alexcrichton

See #9605 for detailed information.

This also fixes two tests of #8811.
Added comments to public functions in num.rs.

Copied existing comments from other files, and added comments to
functions that did not have existing comments available.
auto merge of #9585 : vky/rust/num-docs, r=alexcrichton

Copied existing comments from other files, and added comments to functions that did not have existing comments available. 

cc #7511
auto merge of #9846 : cmr/rust/serialize_uuid, r=alexcrichton
auto merge of #9891 : alexcrichton/rust/allow-warnings, r=brson

Closes #9754