Implement eglSetSwapInterval in the wayland platform

This commit re-instates the use of the frame callback to properly implement
both setSwapInterval(0) and setSwapInterval(1).
Flush the wl_display after committing a new buffer
Fix threading issues with different threads reading from the queue
Try to be smarter than the drivers and always commit a buffer

When the client calls eglSwapBuffers libhybris should always call commit()
on the surface. Android drivers don't always call queueBuffer though so
we can't rely on that. We do know however which buffer will be queued next
so attach and commit that in finishSwap().
Attach the last used buffer if no buffer was dequeued
Merge pull request #220 from giucam/swap-interval

Implement working eglSwapInterval == 1 for Wayland