option: Title-case `Some` and `None` in docs and fail messages

For accuracy, say 'get_ref None' instead of 'get_ref none', and so on.
option: Add .chain_mut_ref()

.chain_mut_ref() is the mutable alternative to .chain_ref().

A use case example for this method is extraction of an optional value
from an Option<Container> value.
test/run-fail: Un-xfail a test, make some other xfailed ones compile (they still don't work).
Added missing memory orderings for atomic types.
Remove unused variables in `compile_submatch`.

Just an minor cleanup.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
rustc: remove some dead functions
tidy: allow arbitrary spaces between // and NOTE

`make tidy` now detects `//NOTE`, `//  NOTE`, etc.
This also removes the extra empty line emitted after each warning.

Fixes #6060
std: rename str.as_bytes_with_null_consume to str.to_bytes_with_null
std: remove os::as_c_charp
std: move str::as_buf into StrSlice
std: move StrUtil::as_c_str into StrSlice
std: add test for str::as_c_str
std and extra: use as_c_str instead of as_buf in a couple places

These uses are assuming the strings are null terminated, so it
should be using `as_c_str` instead of `as_buf`
std: rename str.as_buf to as_imm_buf, add str.as_mut_buf
std: remove str::to_owned and str::raw::slice_bytes_owned
std: remove a malloc from os::fill_charp_buf
str: move as_mut_buf into OwnedStr, and make it `self`
std: simplify str::as_imm_buf and vec::as_{imm,mut}_buf
std: inline str::with_capacity and vec::with_capacity
clean up warnings