Integrate surface client and rework buffer management

Signed-off-by: Simon Busch <morphis@gravedo.de>
Add identify message type rather then sending window id all the time

Signed-off-by: Simon Busch <morphis@gravedo.de>
Further improvements of the buffer management code

Signed-off-by: Simon Busch <morphis@gravedo.de>
Cleanup surface client implementation and add proper return value checks

Signed-off-by: Simon Busch <morphis@gravedo.de>
More work on error case handling

Signed-off-by: Simon Busch <morphis@gravedo.de>
Store window id and make it accessible

Signed-off-by: Simon Busch <morphis@gravedo.de>
Set busy flag for realloacated buffers too

Signed-off-by: Simon Busch <morphis@gravedo.de>
Add client find functionality to surface manager

Signed-off-by: Simon Busch <morphis@gravedo.de>
Drop unneeded debugging output

Signed-off-by: Simon Busch <morphis@gravedo.de>
Only take negative return values of select method as criteria to shutdown

Signed-off-by: Simon Busch <morphis@gravedo.de>