Add Battery Status API events to events.h.
Add webglcontextlost and webglcontextrestored event register callbacks. Don't process deferred requests on events that were not user-originated.