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.