Implement a Once primitive for initialization

Of the 8 static mutexes that are currently in-use by the compiler and its
libraries, 4 of them are currently used for one-time initialization. The
unforunate side effect of using a static mutex is that the mutex is leaked.

This primitive should provide the basis for efficiently keeping track of
one-time initialization as well as ensuring that it does not leak the internal
mutex that is used.

I have chosen to put this in libstd because libstd is currently making use of a
static initialization mutex (rt::local_ptr), but I can also see a more refined
version of this type being suitable to initialize FFI bindings (such as
initializing LLVM and initializing winsock networking on windows). I also intend
on adding "helper threads" to libnative, and those will greatly benefit from a
simple "once" primitive rather than always reinventing the wheel by using
mutexes and bools.

I would much rather see this primitive built on a mutex that blocks green
threads appropriately, but that does not exist at this time, so it does not
belong outside of `std::unstable`.
Add metadata from a tempdir instead of a build dir

Right now if you have concurrent builds of two libraries in the same directory
(such as rustc's bootstrapping process), it's possible that two libraries will
stomp over each others' metadata, producing corrupt rlibs.

By placing the metadata file in a tempdir we're guranteed to not conflict with
ay other builds happening concurrently. Normally this isn't a problem because
output filenames are scoped to the name of the crate, but metadata is special in
that it has the same name across all crates.
Add more benchmark tests to path/posix

Benchmark testing `is_ancestor_of` and `path_relative_from`
Revert "Embed Windows application manifest."
Convert some C functions to rust functions

Right now on linux, an empty executable with LTO still depends on librt becaues
of the clock_gettime function in rust_builtin.o, but this commit moves this
dependency into a rust function which is subject to elimination via LTO.

At the same time, this also drops libstd's dependency on librt on unices that
are not OSX because the library is only used by extra::time (and now the
dependency is listed in that module instead).
Implement volatile_load and volatile_store intrinsics.
Add rust_fail. #11219
auto merge of #11221 : vadimcn/rust/revert-manifest, r=alexcrichton

In view of the problems outlined in #11207, I think manifest embedding should be removed, until we find a better solution.  :-(
Avoid compiler error about glob imports in getopts example
Remove features from librustdoc
auto merge of #11231 : brson/rust/rust_fail, r=alexcrichton

Closes #11219
Fix tests
auto merge of #11142 : alan-andrade/rust/improve_opts_example, r=cmr

Ran into this in practice, fixing it to improve example correctness.
Update documentation to remove reference to ::rt logging
std: print RUST_LOG=::help in sorted order.

Fixes #8949.
auto merge of #11236 : huonw/rust/sort-rust-log-help, r=sanxiyn

Fixes #8949.
auto merge of #11208 : alexcrichton/rust/less-c, r=cmr

Right now on linux, an empty executable with LTO still depends on librt becaues
of the clock_gettime function in rust_builtin.o, but this commit moves this
dependency into a rust function which is subject to elimination via LTO.

At the same time, this also drops libstd's dependency on librt on unices that
are not OSX because the library is only used by extra::time (and now the
dependency is listed in that module instead).
Fix rust-align-to-expr-after-brace, closes #11239.

forward-to-word is undefined, and so Emacs would throw errors in
rust-align-to-expr-after-brace. This change yields the expected
behavior discussed in the issue.
Implement native UDP I/O
Disallow LTO with a preference to dynamic linking

Closes #11154