Guard against too fast deletion of wl_buffers

When creating a wl_buffer using the android_wlegl protocol the server
registers with the native handle only when it processes the request later.
If the client destroys the wl_buffer and the native handle before the server
registers with it, the native handle will be gone and trying to register it
will fail. The server will then send a protocol error because it cannot know
the handle was valid when the client issued the request.
To solve it, register a wl_callback after creating the wl_buffer, which
will be used to block before destroying a buffer if the done event was not
fired yet.

Done-with: Jonas Ådahl <jadahl@gmail.com>
Merge pull request #230 from giucam/buffer_race

Guard against too fast deletion of wl_buffers