backends/drm: fix an edge case for DrmGpu::waitIdle
Polling for drm events works for waiting on pageflip events, but if there's commits scheduled for future submission, and that fails, no pageflip will ever arrive. To fix that, this commit ensures all commits are submitted to the kernel before polling for pageflip events.