lib/igt_kms: Drop all stale events on first commit.

I've been trying to make kms_cursor_legacy work when subtests fail.
Other subtests will start failing too because of expired events or
stale pipe crc. The latter can be resolved in the test, but the former
could affect other tests

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
[mlankhorst: Change return status to int, so callers can see how many events are swallowed.]
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2 files changed