surface core: Fix a potential problem with deallocating buffers.
surface core: Fix a potential problem with deallocating buffers.

dfb_surface_buffer_lock() walks the buffer allocations with
fusion_vector_foreach (alloc, i, buffer->allocs) and if it doesn't
find a suitable allocation it will allocate one. It then tests
alloc against NULL in the error paths to determine if the
allocation was performed. If there are only unsuitable allocations
alloc will not be NULL even though a new allocation was made.
So use other means to keep track if allocation was made.

In the name of keeping the code more readable give
dfb_surface_buffer_write() the same treatment even though it's
not actually necessary there.

djbclark/directfb-core-DirectFB,Distrotech/DirectFB,DirectFB/directfb,kevleyski/directfb,kevleyski/directfb,kevleyski/DirectFB-1,kevleyski/DirectFB-1,DirectFB/directfb,sklnet/DirectFB,jcdubois/DirectFB,djbclark/directfb-core-DirectFB,kevleyski/directfb,sklnet/DirectFB,deniskropp/DirectFB,lancebaiyouview/DirectFB,mtsekm/test,Distrotech/DirectFB,kevleyski/DirectFB-1,deniskropp/DirectFB,dfbdok/DirectFB1,lancebaiyouview/DirectFB,lancebaiyouview/DirectFB,djbclark/directfb-core-DirectFB,kaostao/directfb,lancebaiyouview/DirectFB,djbclark/directfb-core-DirectFB,jcdubois/DirectFB,mtsekm/test,DirectFB/directfb,sklnet/DirectFB,dfbdok/DirectFB1,kevleyski/directfb,dfbdok/DirectFB1,Distrotech/DirectFB,deniskropp/DirectFB,kaostao/directfb,jcdubois/DirectFB,kevleyski/DirectFB-1,mtsekm/test,sklnet/DirectFB,deniskropp/DirectFB,kaostao/directfb