Add detection for page loads.

This doesn't do anything, but adds the stuff to detect the page load. This will be needed to write out the composited texture to PNGs for reftests.

r? @sfowler