egl/dri2: avoid holding big display lock upon client wait
It's safe to drop the global display lock after the sync object is referenced as long as we also add a reference for the display. Drop the refs accordingly. If display loses all refs, which suggests eglTerminate gets called during sleep, pick up display release.
Related: #7039 (closed)
Edited by Yiwei Zhang