Added options to enable or disable restoration of navigation and toolbar states.
Merged.