rustdoc: only filter lines starting with '# ' from the shown code.

Currently any line starting with `#` is filtered from the output,
including line like `#[deriving]`; this patch makes it so lines are only
filtered when followed by a space similar to the current behaviour of
the tutorial/manual tester.
rustdoc: Unify the handling of the hidden example lines.
auto merge of #11185 : huonw/rust/doc-ignore, r=cmr

Currently any line starting with `#` is filtered from the output,
including line like `#[deriving]`; this patch makes it so lines are only
filtered when followed by a space similar to the current behaviour of
the tutorial/manual tester.