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
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
Use slice representation for child crate maps
Use slice representation for module entries in CrateMap

Relaxe lifetime of CrateMap as well.
Use &'self str instead of raw char pointer in ModEntry
Add code for older crate map versions, bumped crate map version number
Fix thread safety issues in dynamic_lib

The root issue is that dlerror isn't reentrant or even thread safe.

The Windows code isn't affected since errno is thread-local on Windows
and it's running in an atomically block to ensure there isn't a green
thread context switch.

Closes #8156
Make a task name use a `SendStr`, allowing for either
static or owned strings
Implemented `IntoSendStr` on `SendStr` to allow naming a
task with a `SendStr` directly
auto merge of #9731 : Kimundi/rust/SendStrTaskName, r=alexcrichton

This resolves a FIXME in `std::rt::task`.
std: check bounds for ints/uints in {To,From}Primitive
extra: Don't truncate {u64,i64} when converting to BigInts
std: fix some warnings
std: ToPrimitive's default impls should use `.to_*()`

This allows the default methods to be properly range checked.