std: iteratize str::is_utf16 & add tests.

Most of the tests are randomly generated with Python 3 and rely on it's
UTF-16be encoder/decoder being correct.
std: convert str::from_utf16 to an external iterator.

Fixes #12316.
str: provide lossy UTF-16 support.

This replaces the iterator with one that handles lone surrogates
gracefully and uses that to implement `from_utf16_lossy` which replaces
invalid `u16`s with U+FFFD.
std: decode even numbered non-BMP planes in the UTF-16 decoder.

Fixes #12318.
std: make str::from_utf16 return an Option.

The rest of the codebase is moving toward avoiding `fail!` so we do it
here too!
mk: Fix the regexp of SHOW_DOCS

The tag marks were missing, and `make tips` didn't work.
mk: Talk about `make clean` in the build help
Removing '15.3 Do syntax' in tutorial.

The 'do' keyword was deprecated in 0.10 #11868 , and is keep as
reserved keyword #12157 .

So the tutorial part about it doesn't make sense.
The spawning explanation was move into '15.2 Closure compatibility'.

Fixing misspelling.

Thanks for precisions.

Moved from 15.2 to 15.1.

Fixed typo, and apply pnkfelix advices.
Avoid returning original macro if expansion fails.

Closes #11692. Instead of returning the original expression, a dummy expression
(with identical span) is returned. This prevents infinite loops of failed
expansions as well as odd double error messages in certain situations.
Clarify unit of size in docs for size_of functions.
Changed the docs in mem.rs to clarify the fact the the size functions return sizes in bytes.
Regression test closes #7660
Make priavcy checking aware that a `use` directive can point to two defintions (namespaces) with different privacy. Closes #4110
auto merge of #12245 : nick29581/rust/priv2, r=alexcrichton

closes #4110
str: add a function for truncating a vector of u16 at NUL.

Many of the functions interacting with Windows APIs allocate a vector of
0's and do not retrieve a length directly from the API call, and so need
to be sure to remove the unmodified junk at the end of the vector.
auto merge of #12317 : huonw/rust/utf16, r=alexcrichton

Iterators! Use them (in `is_utf16`), create them (in `utf16_items`).

Handle errors gracefully (`from_utf16_lossy`) and `from_utf16` returning `Option<~str>` instead of failing.

Add a pile of tests.
rustdoc: Only inject extern crates if not present
auto merge of #12361 : sfackler/rust/rustdoc-test-extern, r=alexcrichton
auto merge of #12364 : Armavica/rust/mk-tips, r=alexcrichton

The command `make tips` did not work properly because of a flaw in the regexp parsing Makefile.in for documentation (`SHOW_DOCS`). I fixed it and also added a note about `make clean` in the build documentation (`make help`).
rustdoc: Fixup links to enum variants

Pages aren't emitted for enum variants, so whenever we're linking to an enum
variant instead link to the parent enum instead.

Closes #12289
rustdoc: Show macros in documentation

Any macro tagged with #[macro_export] will be showed in the documentation for
that module. This also documents all the existing macros inside of std::macros.

Closes #3163
cc #5605
Closes #9954