doc: rename 'nil' to 'unit' when describing `()`
auto merge of #12210 : zr40/rust/patch-1, r=cmr

According to kimundi on IRC, the current term for `()` is 'unit'. This commit updates tutorial.md to change 'nil' to 'unit' where `()` is described.
Stop unloading syntax libraries

Externally loaded libraries are able to do things that cause references
to them to survive past the expansion phase (e.g. creating @-box cycles,
launching a task or storing something in task local data). As such, the
library has to stay loaded for the lifetime of the process.
Include compiler-rt in the distribution tarballs
Resolve type variables when checking casting to char
Remove a source of O(n^2) running time in bigints.

::num::bigint, Remove a source of O(n^2) running time in `fn shr_bits`.

I'll cut to the chase: On my laptop, this brings the running time on
`pidigits 2000` (from src/test/bench/shootout-pidigits.rs) from this:
```
% time ./pidigits 2000 > /dev/null

real	0m7.695s
user	0m7.690s
sys	0m0.005s
```
to this:
```
% time ./pidigits 2000 > /dev/null

real	0m0.322s
user	0m0.318s
sys	0m0.004s
```

The previous code was building up a vector by repeatedly making a
fresh copy for each element that was unshifted onto the front,
yielding quadratic running time.  This fixes that by building up the
vector in reverse order (pushing elements onto the end) and then
reversing it.

(Another option would be to build up a zero-initialized vector of the
desired length and then installing all of the shifted result elements
into their target index, but this was easier to hack up quickly, and
yields the desired asymptotic improvement.  I have been thinking of
adding a `vec::from_fn_rev` to handle this case, maybe I will try that
this weekend.)
Move base64 and hex from libextra to libserialize
Add some missing Show implementations in libstd
Add documentation for conditional-compilation

This documents in-source conditions using #[cfg(...)] and configurations
pre-defined by the compiler.

Fix #7962.
std::comm: replace Handle.id with a method.

The `id` shouldn't be changed by external code, and exposing it publicly
allows to be accidentally changed.

Also, remove the first element special case in the `select!` macro.
Relax an assertion in start_selection()

It asserted that the previous count was always nonnegative, but DISCONNECTED is
a valid value for it to see. In order to continue to remember to store
DISCONNECTED after DISCONNECTED was seen, I also added a helper method.

Closes #12226
mk: make NO_REBUILD more forceful and more general.

Previously crates like `green` and `native` would still depend on their
parents when running `make check-stage2-green NO_REBUILD=1`, this
ensures that they only depend on their source files.

Also, apply NO_REBUILD to the crate doc tests, so, for example,
`check-stage2-doc-std` will use an already compiled `rustdoc` directly.
Register new snapshots
remove duplicate function from std::ptr (is_null, is_not_null, offset, mut_offset)
Lift $dst outside the closure in write!

If you were writing to something along the lines of `self.foo` then with the new
closure rules it meant that you were borrowing `self` for the entirety of the
closure, meaning that you couldn't format other fields of `self` at the same
time as writing to a buffer contained in `self`.

By lifting the borrow outside of the closure the borrow checker can better
understand that you're only borrowing one of the fields at a time. This had to
use type ascription as well in order to preserve trait object coercions.
Rebase conflicts from this giant stack of patches

List of PRs contained in this rollup:

Closes #12167 r=alexcrichton
Closes #12200 r=alexcrichton
Closes #12206 r=pcwalton
Closes #12209 r=huonw
Closes #12211 r=pcwalton
Closes #12217 r=brson
Closes #12218 r=alexcrichton
Closes #12220 r=alexcrichton
Closes #12222 r=kballard
Closes #12225 r=alexcrichton
Closes #12227 r=kballard
Closes #12237 r=alexcrichton
Closes #12240 r=kballard