Fix #72: avoid race condition
Fix #72: avoid race condition

The advance_buffers variable introduced in 954bcbc was not properly locked thus
leading to race conditions in the UI update thread and the actual grab thread.
With this change, we always grab into a single buffer that is updated whenever
the GUI is ready. This avoids latencies but might cause noticeable tearing.

ufo-kit/libuca,ufo-kit/libuca,ufo-kit/libuca,miq/libuca,miq/libuca,miq/libuca