Revert "auto merge of #8645 : alexcrichton/rust/issue-6436-run-non-blocking, r=brson"

This reverts commit b8d1fa399402c71331aefd634d710004e00b73a6, reversing
changes made to f22b4b169854c8a4ba86c16ee43327d6bcf94562.

Conflicts:
	mk/rt.mk
	src/libuv
partial revert of 31fa865

Ratio is generic and so might contain a non-total orderable type. It
should not use the default Ord implementation.
auto merge of #8866 : brson/rust/rvstdrun, r=alexcrichton

...ing, r=brson"

This reverts commit b8d1fa399402c71331aefd634d710004e00b73a6, reversing
changes made to f22b4b169854c8a4ba86c16ee43327d6bcf94562.

Conflicts:
	mk/rt.mk
	src/libuv

This caused a big performance regression on the windows bots and possibly some unexpected segfaults in pretty-printing tests.
reduce the size of UnsafeArc from 2 words to 1
auto merge of #8458 : cmr/rust/test-restructure, r=brson

This should make benchmarks easier to understand. But, it doesn't work.
BENCH_RS in mk/tests.mk has everything, from what I can tell in remake, but
only those that are direct children of src/test/bench get build and run.
@graydon, can you lend your expertise? I can't make heads or tails of this
makefile.
Fix a bug with statics inside blocks in generic fns

Whenever a generic function was encountered, only the top-level items were
recursed upon, even though the function could contain items inside blocks or
nested inside of other expressions. This fixes the existing code from traversing
just the top level items to using a Visitor to deeply recurse and find any items
which need to be translated.

This was uncovered when building code with --lib, because the encode_symbol
function would panic once it found that an item hadn't been translated.

Closes #8134
Correct the sources of glob imports

Closes #8847
Correct indent with trailing spaces/comments on previous line
One indent after open paren with no argument
auto merge of #8819 : vadimcn/rust/unit-tests, r=brson

Some of the tests are failing.  I've only managed to fix 'memory_map_file', the rest are up for grabs...

Fixes #5261.
Make the iterator protocol more explicit

Document the fact that the iterator protocol only defines behavior up
until the first None is returned. After this point, iterators are free
to behave how they wish.

Add a new iterator adaptor Fuse<T> that modifies iterators to return
None forever if they returned None once.
Make Zip iterator short-circuit

Python's zip() short-circuits by not even querying its right-hand
iterator if the left-hand one is done. Match that behavior here by not
calling .next() on the right iterator if the left one returns None.
Multiline comments with leading *s line up the *s
Align field names in struct expressions with fields on same line as the opening curly brace
auto merge of #8839 : sanxiyn/rust/env, r=thestinger
auto merge of #8820 : alexcrichton/rust/no-io-writer, r=brson

At the same time, this updates the TyVisitor to use a mutable self because it's
probably going to be mutating state as it goes along anyway.
auto merge of #8843 : alexcrichton/rust/fix-bug, r=huonw

Whenever a generic function was encountered, only the top-level items were
recursed upon, even though the function could contain items inside blocks or
nested inside of other expressions. This fixes the existing code from traversing
just the top level items to using a Visitor to deeply recurse and find any items
which need to be translated.

This was uncovered when building code with --lib, because the encode_symbol
function would panic once it found that an item hadn't been translated.

Closes #8134
auto merge of #8854 : huonw/rust/rt-papercuts, r=brson

The only user-facing change is handling non-integer (and zero) `RUST_THREADS` more nicely:

```
$ RUST_THREADS=x rustc # old

You've met with a terrible fate, haven't you?

fatal runtime error: runtime tls key not initialized
Aborted
$ RUST_THREADS=x ./x86_64-unknown-linux-gnu/stage2/bin/rustc # new

You've met with a terrible fate, haven't you?

fatal runtime error: `RUST_THREADS` is `x`, should be a positive integer
Aborted
```

The other changes are converting some `for .. in range(x,y)` to `vec::from_fn` or `for .. in x.iter()` as appropriate; and removing a chain of (seemingly) unnecessary pointer casts.

(Also, fixes a typo in `extra::test` from #8823.)
Add missing space
doc/rust.md: Missing in keyword on keyword list.