This adds error checking to the synchronization primitives. And eglWaitGL is now implemented by eglWaitClient. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>