handle webglcontextlost

reload page when WebGL context lost
clean up

remove redundant code