rustdoc: refactor code block language info into a struct.

Fields have names, unlike an anonymous tuple.
rustdoc: add the ability to run tests with --test.

This adds the `test_harness` directive that runs a code block using the
test runner, to allow for `#[test]` items to be demonstrated and still
tested (currently they are just stripped and not even compiled, let
alone run).
testing guide: update to use `test_harness` & fix problems.

rustdoc now supports compiling things with `--test` so the examples in
this guide can be compiled & tested properly (revealing a few issues &
out-dated behaviours).

Also, reword an example to be clearer, cc #12242.
auto merge of #15039 : huonw/rust/rustdoc-testharnesss, r=alexcrichton

    ```test_harness
    #[test]
    fn foo() {}
    ```

will now compile and run the tests, rather than just ignoring & stripping them (i.e. it is as if `--test` was passed).

Also, the specific example in https://github.com/rust-lang/rust/issues/12242 was fixed (but that issue is broader than that example).