Load view state before generating the HTML.

Also forces CodeInspection to wait until the app is ready before updating the status
bar.
Don't start firing preference change events until appReady.

This is part of the fix for #6944. With the change in loading for
set up, causing errors for things like the status bar. By pausing
the preference changes until appReady, we avoid any code attempting
to alter the HTML based on preferences until after everything is
set up.
Track performance impact of user viewstate loading
Merge pull request #6992 from adobe/dangoor/6944-sidebar-width

Cleans up viewstate loading at startup