Add support for compiling examples with --test to rustdoc & update the testing guide

    ```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).
While you're at it, could you de-indent these examples? I'm not sure why the body is indented twice and the last brace/paren is indented once.