compositor: don't try to repaint while offscreen or sleeping
weston_output_schedule_repaint() already checks the compositor state but idle_repaint() is called asynchronously so the state may have changed.
Check the state again and abort if necessary.
Without this the DRM compositor might execute a modeset in drm_output_start_repaint_loop() which should not happen while sleeping or offscreen.