Stop polling for canvas dimension changes: hook into resize events instead. Also, fix a resizing bug where
we failed to paint a resize in both dimensions correctly.