Properly detect webGL in example code in the CanvasRenderer documentation

WebGLRenderingContext may return a truthy value even though WebGL is disabled or when a graphics card is blacklisted. I took the check from Detector.js to properly detect for this and reformatted the code for readability.