Add QGuiApplication::sync() function

This will allow applications to make sure Qt has the same state as the
window system at any given point. The use of this function is
discouraged but it is very useful for auto tests.

Change-Id: I691bff365fc391e9d7213f2607008983505bb774
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Silence the _COMPIZ_DECOR_* warnings on Ubuntu

Earliest occurrence is to my knowledge in 12.04.
It is still unclear how to act on those messages

Change-Id: I7da48281c6bec973448a1d4cd800d445a80695a2
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>