Refactor applyStateFixes into fixPresentation
It is only presentation related now and can be done regardless of the
state of navigation.

A new parameter was added to fixPresentation to control when the page
content will be adjusted. This ensures that when the navigation
switches, the content does not move with the new navigation.
The expand/collapse states should change after the transition delay
This ensures the CSS is in the proper state for calculations.