Add get_opt to std::vec
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: Replace num::IntConvertible with {To,From}Primitive
syntax: Add #[deriving(FromPrimitive)] syntax extension

Right now this only works for c-style enums.
syntax: swap from .span_fatal to .span_err in #[deriving(FromPrimitive)]
test: add compile-fail test for #[deriving(FromPrimitive)]
std: Swap {To,From}Primitive to use the 64bit as the unimplemented version

One downside with this current implementation is that since BigInt's
default is now 64 bit, we can convert larger BigInt's to a primitive,
however the current implementation on 32 bit architectures does not
take advantage of this fact.
extra: Add ToBigInt and ToBigUint traits
Package system runtime dependencies into snapshots
Package system runtime dependencies into Windows distribution.
Use the correct logging crate while monomorphing

This makes sure that the top-level crate name is correct when emitting log
statements for a monomorphized function in another crate. This happens by
tracing the monomorphized ID back to the external source and then using that
crate index to get the name of the crate.

Closes #3046
Document logging and remove old functions

This adds a large doc-block to the top of the std::logging module explaining how
to use it. This is mostly just making sure that all the information in the
manual's section about logging is also here (in case someone decides to look
into this module first).

This also removes the old console_{on,off} methods. As far as I can tell, the
functions were only used by the compiler, and there's no reason for them to be
used because they're all turned off by default anyway (maybe they were turned on
by default at some point...)

I believe that this is the final nail in the coffin and closes #5021
auto merge of #9662 : vadimcn/rust/package-runtime-deps, r=brson

This will make sure that system files that rust binaries depend on in Windows get packaged into stage0 snapshots as well as into Windows installer.
Currently these include `libgcc_s_dw2-1.dll`, `libstdc++-6.dll` and `libpthread-2.dll`.   Note that the latter will need to be changed to `pthreadGC2.dll` once Windows build bots get upgraded to mingw 4.0

Closes #9252
Closes #5878
Closes #9218
Closes #5712
rustc: Use static strings in a few literals

Avoid allocating extra copies of strings by using "" instead of ~"" for
the debug options list and for the `time` function. This is a small
change, but it is in a path that's always executed.
auto merge of #9715 : flo-l/rust/doc-fixes, r=alexcrichton
Register new snapshots

Now that #9662 is merged, we should be much more easily bootstrappable on
windows now.
auto merge of #9717 : blake2-ppc/rust/rustc-static-str, r=alexcrichton

rustc: Use static strings in a few literals

Avoid allocating extra copies of strings by using "" instead of ~"" for
the debug options list and for the `time` function. This is a small
change, but it is in a path that's always executed.
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