Implement font and text cache.
Fix many crashes in context loss; add ?debug=1 paramter to use WebGL debug library.
Remove usage of glGetAttachedShaders which can crash when no context exists
Prevent get* functions called internally by emscripten from returning null: fixes all context loss errors.