Implement `map_mut` on the Option type

Closes #7394
rustc: improve -Z trans-stats to report per-fn LLVM instruction counts and translation timing
Copy the correct libs when using local-rust-root

This fixes a segfault when configuring rust to use local-rust-root. The
libraries were renamed in the 0.6-0.7 transition, and the script was not copying
them all. I also removed the line referencing libcore (now libstd).
remove extra::rope

It's broken/unmaintained and needs to be rewritten to avoid managed
pointers and needless copies. A full rewrite is necessary and the API
will need to be redone so it's not worth keeping this around.

Closes #2236, #2744
auto merge of #7456 : graydon/rust/better-trans-stats, r=cmr

This way when you compile with -Z trans-stats you'll get a per-function cost breakdown, sorted with the most expensive functions first. Should help highlight pathological code.
auto merge of #7629 : thestinger/rust/rope, r=graydon

It's broken/unmaintained and needs to be rewritten to avoid managed
pointers and needless copies. A full rewrite is necessary and the API
will need to be redone so it's not worth keeping this around (#7628).

Closes #2236, #2744
remove some method resolve workarounds
auto merge of #7586 : g5pw/rust/master, r=cmr

This updates the script in src/etc/local_stage0.sh to copy the correct libraries
to stage0.
Fix a warning when generating tests
auto merge of #7591 : alexcrichton/rust/fix-warnings, r=huonw

Closes #7589
auto merge of #7497 : alexcrichton/rust/issue-7394, r=huonw
vec: make vec_reserve_shared_actual private
add a temporary vector_exchange_malloc lang item
Merge pull request #7595 from thestinger/iterator

remove some method resolve workarounds
remove headers from exchange allocations
auto merge of #7605 : thestinger/rust/vec, r=Aatch

This is work continued from the now landed #7495 and #7521 pulls.

Removing the headers from unique vectors is another project, so I've separated the allocator.
Avoid unused allocas for immediate return values

There's no need to allocate a return slot for anykind of immediate
return value, not just not for nils. Also, when the return value is
ignored, we only have to copy it to a temporary alloca if it's actually
required to call drop_ty on it.
Improve handling of immediate return values

We currently still handle immediate return values a lot like
non-immediate ones. We provide a slot for them and store them into
memory, often just to immediately load them again. To improve this
situation, trans_call_inner has to return a Result which contains the
immediate return value.

Also, it also needs to accept "No destination" in addition to just
SaveIn and Ignore. Since "No destination" isn't something that fits
well into the Dest type, I've chosen to simply use Option<Dest>
instead, paired with an assertion that checks that "None" is only
allowed for immediate return values.