In 'core_deinit_emergency()', e.g. when a signal is caught, try to prohibit graphics hardware access by doing a 'gfxcard_sync()' and a 'pthread_mutex_trylock()' on 'card->lock' up to 100 times, this may fail if the current thread locked it itself.
In 'core_deinit_emergency()', e.g. when a signal is caught, try to prohibit
graphics hardware access by doing a 'gfxcard_sync()' and a
'pthread_mutex_trylock()' on 'card->lock' up to 100 times,
this may fail if the current thread locked it itself.

Fixes corruption of X when moving the mouse cursor during a crash.

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