mk: Clean up conditions for including dist.mk
mk: Add prepare.mk

This is a slightly more generic rewrite of install.mk. Currently
used for nothing, but we'll base all the binary distributables off it.
mk: Base the install target on prepare.mk
mk: Fix a dist bug

Fallout from moving doc/ to src/doc
mk: Base the windows dist target on prepare.mk
Minor documentation fixes in std::fmt

* Change '...your own time' => '...your own type'
* Fix typo in the Vector2D example
Clean up std::task docs, make TaskBuilder a real builder

Delete all the documentation from std::task that references linked
failure.

Tweak TaskBuilder to be more builder-like. .name() is now .named() and
.add_wrapper() is now .with_wrapper(). Remove .watched() and
.unwatched() as they didn't actually do anything.
Update clients of the TaskBuilder API
Allow configuration of uid/gid/detach on processes

This just copies the libuv implementation for libnative which seems reasonable
enough (uid/gid fail on windows).

Closes #12082
Upgrade libuv

This notably includes joyent/libuv@6f62d62c in order to fix when processes fail
to spawn on windows
auto merge of #12085 : alexcrichton/rust/issue-12082, r=brson

This just copies the libuv implementation for libnative which seems reasonable
enough (uid/gid fail on windows).

Closes #12082
Address review feedback
Rename Bitwise::population_count to Bitwise::count_ones and add Bitwise::count_zeros

These are inspired by the [functions in the Julia standard library](http://docs.julialang.org/en/release-0.2/stdlib/base/#Base.count_ones).
Forbid use of generics with foreign functions. Closes #10353.
auto merge of #12284 : brson/rust/install, r=alexcrichton

Work toward #9876.

This adds `prepare.mk`, which is simply a more heavily-parameterized `install.mk`, then uses `prepare` to implement both `install` and the windows installer (`dist`). Smoke tested on both Linux and Windows.
auto merge of #12325 : big-guy/rust/doc-fixes, r=alexcrichton

* Change '...your own time' => '...your own type'
* Fix typo in the Vector2D example
auto merge of #12331 : bjz/rust/count-ones, r=alexcrichton

This is inspired by the [function naming in the Julia standard library](http://docs.julialang.org/en/release-0.2/stdlib/base/#Base.count_ones). It seems like a more self-explanatory name, and is more consistent with the accompanying methods, `leading_zeros` and `trailing_zeros`.
Added more scripts to tidy check
auto merge of #12337 : nick29581/rust/generic_extern, r=alexcrichton

and fix up some formatting.
Fix a deadlock in channels, again.

This deadlock was caused when the channel was closed at just the right time, so
the extra `self.cnt.fetch_add` actually should have preserved the DISCONNECTED
state of the channel. by modifying this the channel entered a state such that
the port would never succeed in dropping.

This also moves the increment of self.steals until after the MAX_STEALS block.
The reason for this is that in 'fn recv()' the steals variable is decremented
immediately after the try_recv(), which could in theory set steals to -1 if it
was previously set to 0 in try_recv().

Closes #12340