Only resize canvas if the size changed.

Resizing the canvas erases it, and Dygraphs had skipped the redraw
when it thought it wasn't necessary, leading to blank graphs after
a redundant .resize() call.