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.
Merge pull request #260 from klausw-g/resize-fix-2

Only resize canvas if the size changed.