rustdoc: Generate valid code for struct-variants

Closes #9587
rustdoc: Add the ability to input json

This modifies the command-line usage of rustdoc to intake its own JSON output as
well as a rust source file. This also alters the command line from
`rustdoc input file`  to `rustdoc file` with the input/output formats specified
as -r and -w, respectively.

When using a JSON input, no passes or plugins are re-run over the json, instead
the output is generated directly from the JSON that was provided. Passes and
plugins are still run on rust source input, however.
rustdoc: Update the man page

Closes #9622
rustdoc: Detect repeated keys and fix width

When a key is pressed and held, this now does the OS-style repeating after a bit
of a pause. Also fixes the width of search results to be correct (was changed
beforehand and didn't catch this).
rustdoc: Use a BufferedWriter when emitting source

This takes the rendering time of source files for libstd from 12.5s to 0.1s,
turns out write! calls the write function *a lot*
rustdoc: Stop ignoring dox on fields/variants

This is progress towards #9611
rustdoc: Don't ignore dox on impl blocks

Closes #9611
auto merge of #9636 : alexcrichton/rust/rustdoc, r=huonw

Commits have all the juicy details.

Import thing to note in this pull request is that `rustdoc html crate.rs` becomes `rustdoc crate.rs`