Only resize the canvas if needed

Prevents a redraw in some browsers
Add a window.performance.now polyfill

Add a charset to the page plus move ontouchmove disabling to Controls.js
Cleanup and convert from tabs to spaces