Expose ability to save and restore state.

Use case for this is when you want to restore state due to something other than a configuration change. For example, I have different layouts for portrait vs. landscape and the sliding up panel is not used in the landscape layout. Therefore its state is not restored if I rotate to landscape and back to portrait. With this change, however, I can manually save the sliding up panel state on rotation to landscape and restore it when the user rotates back to portrait.