[std::ascii] Add .to_ascii_opt() and .into_ascii_opt() returning Option

… instead of failing.

Make them default methods on the trait, and also make .to_ascii()
a default method while we’re at it.

Conflicts:
	src/libstd/ascii.rs
rustc: Strip struct fields and enum variants

Closes #11085
std: uniform modules titles for doc

This commit uniforms the short title of modules provided by libstd,
in order to make their roles more explicit when glancing at the index.

Signed-off-by: Luca Bruno <lucab@debian.org>
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`.
Stop using @ExtCtxt
Remove unecessary extern "Rust" specifiers
Stop passing duplicate parameters in expand
rust.md : update crate attributes.

#[ author = "Jane Doe" ]; raises "warning: unknown crate attribute"
auto merge of #11134 : lucab/rust/lucab/libstd-doc, r=cmr

Uniform the short title of modules provided by libstd, in order to make their roles more explicit when glancing at the index.
Add /doc/{green,native} to .gitignore
Add method .as_mut_slice() to MutableVector

This method is primarily intended to allow for converting a [T, ..N] to
a &mut [T].
Add /doc/{rustc,syntax} to .gitignore
Rename pkgid variables
Rename PkgId to CrateId
Rename uses of PkgId to CrateId in librustpkg
Update Docs to use crateid
Register new snapshots.
Actually block in a windows cvar

Turns out with an argument of 0 the function always returns immediately!

Closes #11003
Fix a deadlock in a libgreen test

Turns out when you grab an OS mutex, you need to be careful about when and where
things are scheduled!
auto merge of #11204 : alexcrichton/rust/issue-11200, r=cmr

Turns out when you grab an OS mutex, you need to be careful about when and where
things are scheduled!

I've confirmed that I could fairly reliably get a deadlock (1 in 100 times ish) before this, and I cannot get a deadlock after this (after 1000+ runs).

Closes #11200