Save and restore the ctx for cached characters
Save and restore the ctx for cached characters

Drawing dim colors sets the globalAlpha to 0.5, so we need to
save/restore the ctx state. Otherwise, every time we draw some dim
content, our display will get progressively dimmer.

I tested this by running `echo '\u001b[2mfoo'` a few times in zsh.

Fixes #1424

Tyriar/xterm.js,xtermjs/xterm.js,Tyriar/xterm.js,xtermjs/xterm.js,xtermjs/xterm.js,sourcelair/xterm.js,Tyriar/xterm.js,sourcelair/xterm.js,Tyriar/xterm.js,sourcelair/xterm.js,xtermjs/xterm.js,Tyriar/xterm.js,xtermjs/xterm.js,sourcelair/xterm.js