st/egl: Reduce validation round-trips in DRI2 backend.
st/egl: Reduce validation round-trips in DRI2 backend.

This is similar to the changes to reduce the round-trips in ximage
backend.

When the server supports DRI_InvalidateBuffers, the event is used to
update the server stamp (this path is not tested).  Otherwise, the
server stamp is updated when flush_frontbuffer or swap_buffers is
called.  This makes sure at least the client APIs get the new buffers
when a new frame is started while skipping all round-trips during the
drawing.

KTXSoftware/glsl2agal,zz85/glsl-optimizer,adobe/glsl2agal,djreep81/glsl-optimizer,KTXSoftware/glsl2agal,KTXSoftware/glsl2agal,mapbox/glsl-optimizer,tokyovigilante/glsl-optimizer,benaadams/glsl-optimizer,KTXSoftware/glsl2agal,zz85/glsl-optimizer,wolf96/glsl-optimizer,metora/MesaGLSLCompiler,jbarczak/glsl-optimizer,mcanthony/glsl-optimizer,djreep81/glsl-optimizer,jbarczak/glsl-optimizer,dellis1972/glsl-optimizer,zz85/glsl-optimizer,benaadams/glsl-optimizer,zeux/glsl-optimizer,jbarczak/glsl-optimizer,djreep81/glsl-optimizer,adobe/glsl2agal,adobe/glsl2agal,metora/MesaGLSLCompiler,KTXSoftware/glsl2agal,zeux/glsl-optimizer,dellis1972/glsl-optimizer,mcanthony/glsl-optimizer,zz85/glsl-optimizer,djreep81/glsl-optimizer,adobe/glsl2agal,dellis1972/glsl-optimizer,mapbox/glsl-optimizer,zz85/glsl-optimizer,benaadams/glsl-optimizer,tokyovigilante/glsl-optimizer,dellis1972/glsl-optimizer,mcanthony/glsl-optimizer,wolf96/glsl-optimizer,bkaradzic/glsl-optimizer,jbarczak/glsl-optimizer,dellis1972/glsl-optimizer,bkaradzic/glsl-optimizer,metora/MesaGLSLCompiler,benaadams/glsl-optimizer,mcanthony/glsl-optimizer,wolf96/glsl-optimizer,benaadams/glsl-optimizer,bkaradzic/glsl-optimizer,bkaradzic/glsl-optimizer,zeux/glsl-optimizer,mapbox/glsl-optimizer,benaadams/glsl-optimizer,tokyovigilante/glsl-optimizer,djreep81/glsl-optimizer,zeux/glsl-optimizer,zeux/glsl-optimizer,mapbox/glsl-optimizer,zz85/glsl-optimizer,tokyovigilante/glsl-optimizer,tokyovigilante/glsl-optimizer,mcanthony/glsl-optimizer,wolf96/glsl-optimizer,wolf96/glsl-optimizer,jbarczak/glsl-optimizer,bkaradzic/glsl-optimizer,mapbox/glsl-optimizer,adobe/glsl2agal