Implement new BaseNativeWindow API and cleanup up code

Signed-off-by: Simon Busch <morphis@gravedo.de>
Wait for the sync fence when graphic driver returns rendering buffer

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