Track rerender msgs

If the compositor outputs to a file:
* Track rerender msgs sent from the compositor to the render tasks.
* Before outputting, wait until all rerender msgs are processed by the
  render tasks.

Fixes issue https://github.com/servo/servo/issues/2871.
Merge pull request #2930 from bjwbell/track-rerender-msgs

Track rerender msgs