Implement state change verifier.

This fixes intermittent waiting bugs in testNewTabHistory by waiting for
all relevant state that we assert to change after page load.