Adding initial fullscreen support, messing with resize of the canvas element.

Fixed screen flicker on resize.
Do resize calculations less often.