Fix unwinding on OS X 10.9.

OS X 10.9's linker has a bug that results in it failing to preserve
DWARF unwind information when passed the -no_compact_unwind flag.
This flag is passed on OS X because the unwind information for
__morestack cannot be represented by the compact unwind format.

We can work around this problem by using a more targeted approach
to disabling compact unwind information. The OS X linker looks for
a particular pattern in the DWARF unwind information and will not
attempt to convert the unwind information to the compact format.
The pattern in question is the return address register being saved
twice to the same location.

Fixes #6849.
add feature gate for managed boxes

I'll flip this on after doing a snapshot. This syntax may or may not
stay around, and managed boxes are currently not very useful. They have
the same overall performance characteristics as `std::rc::Rc`, but are
significantly slower, allocate larger boxes and hold onto the memory
beyond when it is needed due to lacking move semantics.

There are currently two useful aspects of the type:

* the dereference sugar, which we should implement for `Rc`
* the annihilator freeing cycles at the end of the task
Minor grammatical fixes and removed section on 'rust' tool
auto merge of #9923 : thestinger/rust/managed_boxes, r=brson

I'll flip this on after doing a snapshot. This syntax may or may not
stay around, and managed boxes are currently not very useful. They have
the same overall performance characteristics as `std::rc::Rc`, but are
significantly slower, allocate larger boxes and hold onto the memory
beyond when it is needed due to lacking move semantics.

There are currently two useful aspects of the type:

* the dereference sugar, which we should implement for `Rc`
* the annihilator freeing cycles at the end of the task
auto merge of #10013 : bdash/rust/mavericks-unwinding, r=alexcrichton

OS X 10.9's linker has a bug that results in it failing to preserve
DWARF unwind information when passed the -no_compact_unwind flag.
This flag is passed on OS X because the unwind information for
__morestack cannot be represented by the compact unwind format.

We can work around this problem by using a more targeted approach
to disabling compact unwind information. The OS X linker looks for
a particular pattern in the DWARF unwind information and will not
attempt to convert the unwind information to the compact format.
The pattern in question is the return address register being saved
twice to the same location.

Fixes #6849.
auto merge of #9969 : reedlepee123/rust/priv_fields, r=bstrie
Tidy up asm! usage in libstd
std::rand: add the Sample and IndependentSample traits.

These are a "parameterised" Rand.
std::rand: Add RandSample for Sample-ing Rand types directly.
std::rand: full exponential & normal distributions

Complete the implementation of Exp and Normal started by Exp1 and
StandardNormal by creating types implementing Sample & IndependentSample
with the appropriate parameters.
std::rand: add distributions::Range for generating [lo, hi).

This reifies the computations required for uniformity done by
(the old) `Rng.gen_integer_range` (now Rng.gen_range), so that they can
be amortised over many invocations, if it is called in a loop.

Also, it makes it correct, but using a trait + impls for each type,
rather than trying to coerce `Int` + `u64` to do the right thing. This
also makes it more extensible, e.g. big integers could & should
implement SampleRange.
std::rand: documentation & references.

Most importantly, links to the papers/references for the core
algorithms (the RNG ones & the distribution ones).
std::rand: optimise & document ziggurat.

Before:

    test rand::distributions::bench::rand_exp ... bench: 1399 ns/iter (+/- 124) = 571 MB/s
    test rand::distributions::bench::rand_normal ... bench: 1611 ns/iter (+/- 123) = 496 MB/s

After:

    test rand::distributions::bench::rand_exp ... bench: 712 ns/iter (+/- 43) = 1123 MB/s
    test rand::distributions::bench::rand_normal ... bench: 1007 ns/iter (+/- 81) = 794 MB/s
std::rand: lengthen the RNG benchmarks.

This makes them more representative, as the `bh.iter` is a smaller
percentage of the total time.
std::rand: move Weighted to distributions.

A user constructs the WeightedChoice distribution and then samples from
it, which allows it to use binary search internally.
auto merge of #10020 : mletterle/rust/documentation-fixes, r=thestinger

I'm planning on doing more updates, but the section in the tutorial stood out at me since the 'rust' tool no longer exists, this should probably be removed to lessen confusion.
std::rand: simplify/safe-ify the default Rng.fill_bytes.

The `&[u8]` -> `&[u64]` and `&[u32]` casts were not nice: they ignored
alignment requirements and are generally very unsafe.
std::rand: use "nothing up your sleeve numbers" for ISAAC tests.

There's no value in using the "random" numbers, when nothing up your
sleeve numbers are perfectly serviceable.

http://en.wikipedia.org/wiki/Nothing_up_my_sleeve_number
std::rand: seed ISAAC with no transmutes.

Slice transmutes are now (and, really, always were) dangerous, so we
avoid them and do the (only?) non-(undefined behaviour in C) pointer
cast: casting to *u8.
libsyntax/librustc: Allow specifying mut on by-value self.