wayland: Introduce surface state locking capabilities
In certain cases it can be useful to delay applying a surface commit. As an example, the compositor may wait until the committed graphics buffer is ready for reading to avoid stalling its graphics pipeline.
This change introduces basic surface state locking capabilities and ports some surface extensions to new helpers to manage associated state.
cc #91
Edited by Vlad Zahorodnii