dri2: Protect against dri2ClientPrivate assertion failures
If DRI2ScreenInit hasn't been called yet, DRI2Authenticate and DRI2CreateDrawable2 cause the X server to crash. This has been observed to happen on multiple modern Linux distros in various conditions, including QEMU and VMware VMs. Make these functions more robust in order to prevent the crash.
This patch was originally provided by Bernhard Übelacker and expanded upon by Mark Wagner.
Signed-off-by: Doug Brown doug@schmorgal.com Closes: #1053 Closes: #1534