auto merge of #9723 : blake2-ppc/rust/trans-no-push-ctxt-clone, r=alexcrichton

Avoid cloning the stack on every `push_ctxt` call in trans

Rewrite the use of TLS variable for `push_ctxt` so that it uses a ~[]
instead of a @~[]. Before it cloned the whole vector on each push and
pop, which is unnecessary.
Cache more results of const_eval

According to http://huonw.github.io/isrustfastyet/mem/#012f909, the "const
marking" pass generates about 400MB of extra memory during compilation. It
appears that this is due to two different factors:

    1. There is a `ccache` map in the ty::ctxt which is only ever used in this
       pass, so this commit moves the map out of the ty::ctxt struct and into
       just this pass's visitor. This turned out to not benefit that much in
       memory (as indicated by http://i.imgur.com/Eo4iOzK.png), but it's helpful
       to do nonetheless.

    2. During const_eval, there are a lot of lookups into decoding inlined items
       from external crates. There is no caching involved here, so the same
       static or variant could be re-translated many times. After adding
       separate caches for variants and statics, the memory peak of compiling
       rustc decreased by 200MB (as evident by http://i.imgur.com/ULAUMtq.png)

The culmination of this is basically a slight reorganization of a caching map
for the const_eval pass along with a 200MB decrease in peak memory usage when
compiling librustc.
auto merge of #9718 : alexcrichton/rust/snapshots, r=sanxiyn

Now that #9662 is merged, we should be much more easily bootstrappable on
windows now.
Don't fail when unpacking the windows snapshot

Newly having a third-party directory was throwing off the unpack script
auto merge of #9722 : alexcrichton/rust/less-mem, r=sanxiyn

According to http://huonw.github.io/isrustfastyet/mem/#012f909, the "const
marking" pass generates about 400MB of extra memory during compilation. It
appears that this is due to two different factors:

    1. There is a `ccache` map in the ty::ctxt which is only ever used in this
       pass, so this commit moves the map out of the ty::ctxt struct and into
       just this pass's visitor. This turned out to not benefit that much in
       memory (as indicated by http://i.imgur.com/Eo4iOzK.png), but it's helpful
       to do nonetheless.

    2. During const_eval, there are a lot of lookups into decoding inlined items
       from external crates. There is no caching involved here, so the same
       static or variant could be re-translated many times. After adding
       separate caches for variants and statics, the memory peak of compiling
       rustc decreased by 200MB (as evident by http://i.imgur.com/ULAUMtq.png)

The culmination of this is basically a slight reorganization of a caching map
for the const_eval pass along with a 200MB decrease in peak memory usage when
compiling librustc.
Fix minor typo in std::str module docs
Fixed another minor typo in std::str docs
auto merge of #9726 : Valloric/rust/typo_fix, r=alexcrichton
auto merge of #9727 : Valloric/rust/doc-fixes, r=catamorphism
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