Give term.fg() and term.bg() a bool return value
term: Add new function .attr() to toggle terminal attributes

Also add .supports_attr() to test for attribute support without writing
anything to output.

Update .reset() to use sgr0 instead of op.
Highlight rustc's warnings/errors in bold instead of bright white

Clang actually highlights using bold, not using bright white. Match
clang on this so our diagnostics are still readable on terminals with a
white background.
Don't re-parse terminfo (twice!) on every compiler diagnostic

Stuff the term::Terminal into TLS to avoid re-parsing for every single
message we want to color.

Fixes #6827.
auto merge of #7716 : kballard/rust/term-attr, r=cmr

Teach `extra::term` to support more terminal attributes than just color.

Fix the compiler diagnostic messages to print in bold instead of bright white. This matches Clang's output.

Cache the term::Terminal instead of re-parsing for every diagnostic (fixes #6827).