use much faster regexp for ansi coloring

ansispan function adapted from mmalecki/ansispan

The easiest way to see how slow the old way was is to create a very large traceback (e.g. max recursion), which bring everything to a screeching halt (even future page loads, if the output is saved).  Now a max recursion error draws in a second or two.

closes #3198
Merge pull request #3201 from minrk/fastcolor

use much faster regexp for ansi coloring