Strip non color related ANSI escape sequences from notebook output.

This fixes issue #2385.
Merge pull request #3136 from jfeser/8b94eddb4d15ce6f0c98675116d4609bdaaf99d9

Strip useless ANSI escape codes in notebook

ANSI color escape codes get handled specially by the notebook, but other kinds of codes just get printed out. Strip these codes out of the notebook output.

closes #2385