Use the current context to resolve extensions.

When updating the code to not use direct gl calls, this
code was changed to use the context's gl context. The
context doesn't have a context when the rendering happens
on the same thread as the scene graph rendering and
we get a crash.

Change-Id: I8adf62c0ed12bb055982a71ba59af76afeefcca1
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Avoid eventloop recursion in touch event handling.

The eventloop recursion in the threaded render loop
was there to preempt any pending event to make sure
we worked with as recent as possible input events. The
benefit of this was never verified.

The recursion after the actual flush was to fix animations
which were constantly started during touch events, such
as a behavior tracking the mouse point. This is fixed
differently.

Event loop recursion is always dangerous, so we're
doing what we can to avoid it.

Change-Id: I120b2e98350e3b9068153415a671408773fbc769
Reviewed-by: Michael Brasser <michael.brasser@live.com>