Bug 912020 - Save to settings DB when leaving the panel r=evelyn

https://bugzilla.mozilla.org/show_bug.cgi?id=912020
1. Save to settings DB when leaving the panel.
2. Refresh enabled layouts when entering the panel.