compositor: track rerender msgs

Add tracking of rerender msgs. If outputting to a file don't exit until
all rerender msgs are complete.