Added code that use mainthread invoker to transfer control when grabbing
images.
Removed redundant invoke-in-main-thread code in opengl-grabber.