expand terminal color support

adds support for VT100 256 colors, and 24 bit RGB

The only terminal color feature that I am aware of that we still don't support is the ANSI bright / non-bright distinction.

It should also improve the handling of unrecognized color escapes (stripping, rather than leaving untouched).

Definitely needs testing, as the 256-color support is a bit complicated (ping @ivanov).

There is one related benefit that I was able to get this into a single replace call with regular expressions,
rather than a sequence of replacements, so it might be faster than before.


closes #3617