Fix window decorations to be thread safe

Rather than have window decorations that paint directly to the paint
device representing the window surface, window decorations are now
generated on demand into a backing store based on their current state,
and then are rendered to a surface when needed.

There is still a problem with resizing though that needs to be
addressed.

Change-Id: I7516628239eb0f9ae46d49bcb4bb2cb94ec6a617
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Make resizing thread-safe

Change-Id: I57407fe3d3877f59b1587ec94ff88a44195271cb
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Remove unnecessary blocking roundtrip

Change-Id: Ie12cdc1d2d931dc86497188d69b34bae47fa6dcc
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Forgot to clear state after resize

Change-Id: I596cba84a1d4e36daa58ddcce02a02ca8320712d
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Use the api instead of accessing "private" static variables

Change-Id: I1dd7fe72de5b88d4bbde1d91912abd78ff833a64
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Add warning to makeCurrent if it fails

and remove code thats not needed anymore

Change-Id: Ie79b1bd3d3cb632ba75ec429c1323ee679b274a9
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Need to NULL check for waylandBufferHandle of m_backBuffer

After unmapped, waylandBufferHandle of m_backBuffer can be null
when another buffer attached before sendFrameCallback() called.

Change-Id: I3470e42ca09466c5b2ecc6d6438090f5af50f59d
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Fix threaded resizing once more :)

This time make Scenegraph also play along nicely

Change-Id: I8d52fe2fc514466cef40e247e978434d8014e18b
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>