WebGLRenderer: Modify to take in existing WebGL context

This patch modifies WebGLRenderer to take in an existing WebGL context, and adds an unit test to test the behaviour.

Signed-off-by: Prabindh Sundareson <prabindh@yahoo.com>