Fix remaining documentation to reflect fail!() -> panic!()

Throughout the docs, "failure" was replaced with "panics" if it means a
task panic. Otherwise, it remained as is, or changed to "errors" to
clearly differentiate it from a task panic.
Fix documentation bug

The first paragraph must be separated from the next paragraph.
Otherwise, rustdoc will consider the content of the latter as part of
the title.
std: Rename AsRef{Reader,Writer} to ByRef{Reader,Writer}
Fix inconsistent use of substs in trans_unboxing_shim

Substs were not applied when calling `untuple_arguments_if_necessary`.
Just apply them once at the start of the function, rebinding `fty`.
Also change the function to take them by reference since we don't
need to consume them at all.  Closes #18883
Add regression test for #18883
Results aren't panics

A typo about Results being panics crawled in. Fixing it.
Tweak and add test for detecting libraries with mismatching target triples.

Closes #10814.
Add error message specific to \<carriage return>.

This can crop-up with a misconfigured editor or an unexpected
interaction between version control and certain operating systems.

Closes #11669.
Add more "help: ..."'s to the parser.

Adds a method for printing a fatal error and also a help message to the
parser and uses this in a variety of places to improve error messages.

Closes #12213.
Use the correct span for out-of-range int literals.

This corrects the error message to point at the literal, not the next
token.

Closes #17123.
auto merge of #18840 : huonw/rust/tweaks, r=alexcrichton

Fix some old papercuts with diagnostics, e.g. tweaking spans, rewording messages. See individual commits.
auto merge of #18891 : erickt/rust/deprecate-as-ref, r=alexcrichton

It seems odd that the `AsRefReader`/`AsRefWriter` have the single method `by_ref()`. This creates the new traits `ByRefReader`/`ByRefWriter` and deprecates the old traits.
auto merge of #18893 : bkoropoff/rust/issue-18883, r=alexcrichton

This was a simple case of substitutions being applied inconsistently.  I haven't investigated why type parameters are actually showing up in the closure type here, but trans needs to handle them correctly in any case.
auto merge of #18880 : barosl/rust/doc-fail-to-panic, r=alexcrichton

I found some occurrences of "failure" and "fails" in the documentation. I changed them to "panics" if it means a task panic. Otherwise I left it as is, or changed it to "errors" to clearly distinguish them.

Also, I made a minor fix that is breaking the layout of a module page. "Example" is shown in an irrelevant place from the following page: http://doc.rust-lang.org/std/os/index.html
auto merge of #18894 : ArtemGr/rust/patch-1, r=pnkfelix

A typo about Results being panics crawled in. Fixing it.