compositor: Add throttled repaint

When using vblank while the screen is turned off, only 1 notification
per second is triggered.

In such a case, there is no need for the compositor to retry repainting
the screen at such a high pace as when when the screen is on.

To avoid wasting power resources, simply throttle repaints after 100
unsuccessful retries.

Signed-off-by: Olivier Fourdan <fourdan@xfce.org>
Closes:#502
2 jobs for master in 2 minutes and 50 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Build
passed #10223
build

00:01:07

 
  Distcheck
passed #10224
distcheck

00:01:43