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: Fix the set up of the main thread so that it doesn't try to steal work

This is causing really awful scheduler behavior where the main thread scheduler is
continually waking up, stealing work, discovering it can't actually run the work,
and sending it off to another scheduler.
add an `abort` intrinsic

This should be preferred to the libc `abort` function.
auto merge of #9860 : thestinger/rust/abort, r=Aatch

This should be preferred to calling the libc `abort` function.
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
Remove extra::flatpipes

Closes #9884
Initial sketching out of the new path module

Define the basic types, and the GenericPath trait.

This module is currently called path2. It will be renamed later.
path2: Implement PosixPath

Fixes #5389 (new conventions for Path constructor)
path2: Start reimplementing in terms of ~[u8] instead of ~str

As documented in #7225, we cannot rely on paths being representable in
utf-8. Specifically, Linux allows anything (besides NUL) in a path.
Redesign GenericPath in light of this.

PosixPath hasn't been reimplemented yet for ~[u8].
path2: Reimplement PosixPath in terms of ~[u8]
path2: Update all the tests for the new [u8]-based approach
path2: Add tests for the [u8]-based methods
path2: Extract posix/windows into their own files

Move PosixPath into posix::Path.
path2: Add more tests to posix impl
path2: Update for changes from master
path2: Implement WindowsPath
path2: Rename Path::new() to Path::from_vec()