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.
Fix po4a.conf
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.
fix "warning: deprecated syntax, use `for` keyword now"
Reference: Fix list in Expressions section
convert 1 line match to 2 lines for readability
Don't use rust  keyword for fake code
src/etc/snapshot: support triples lacking a vendor
Make std::io::Buffer object-safe.

[breaking-change]
Any uses of Buffer::lines() and Buffer::chars() will need to use the new trait std::io::BufferPrelude.
Remove BTreeSet from all examples.
Rewrite std::sync::TaskPool to be load balancing and panic-resistant

The previous implementation was very likely to cause panics during
unwinding through this process:

- child panics, drops its receiver
- taskpool comes back around and sends another job over to that child
- the child receiver has hung up, so the taskpool panics on send
- during unwinding, the taskpool attempts to send a quit message to
  the child, causing a panic during unwinding
- panic during unwinding causes a process abort

This meant that TaskPool upgraded any child panic to a full process
abort. This came up in Iron when it caused crashes in long-running
servers.

This implementation uses a single channel to communicate between
spawned tasks and the TaskPool, which significantly reduces the complexity
of the implementation and cuts down on allocation. The TaskPool uses
the channel as a single-producer-multiple-consumer queue.

Additionally, through the use of send_opt and recv_opt instead of
send and recv, this TaskPool is robust on the face of child panics,
both before, during, and after the TaskPool itself is dropped.

Due to the TaskPool no longer using an `init_fn_factory`, this is a

[breaking-change]

otherwise, the API has not changed.

If you used `init_fn_factory` in your code, and this change breaks for
you, you can instead use an `AtomicUint` counter and a channel to
move information into child tasks.
auto merge of #18840 : huonw/rust/tweaks, r=alexcrichton

Fix some old papercuts with diagnostics, e.g. tweaking spans, rewording messages. See individual commits.