process commit/flush_damage events

Record graph events from core_commit_damage and core_flush_damage
events, and record also the final presentation time from
core_repaint_finished.

All clean-up and graph writing still missing.