cogl-winsys-glx: Fix frame notification race/leak

If a second `set_{sync,complete}_pending` was queued before the idle
handler had flushed the first then one of them would be forgotten.
It would stay queued forever and never emitted as a notification.

This could happen repeatedly causing a slow leak. But worse still,
`clutter-stage-cogl` would then have `pending_swaps` permanently stuck
above zero preventing the presentation timing logic from being used.

The problem is that a boolean can only count to one, but in some cases
(triple buffering, whether intentional or accidental #334) we need it to
count to two. So just change booleans to integers and count properly.

GNOME/mutter!216
3 jobs for !216 with fix-pending-swaps in 4 minutes and 32 seconds (queued for 3 seconds)
detached
Status Job ID Name Coverage
  Review
passed #270355
check-commit-log

00:00:38

 
  Build
passed #270356
build-mutter

00:01:26

 
  Test
passed #270357
test-mutter

00:02:27