Send browser window resizes if there is a listener (#10055)

This also introduces PageState, which is at the moment a part of
UIState.

Change-Id: I4f927e6b8217fa789d83ce5e0d8254b141f485c7