Bug 1015853 - Changing theme should update wallpaper image r=arthurcc

I just realized that switching themes very quickly results in some issues. In addition to  a unnecessary DB writes, if you switch themes like 10 times and back to homescreen, it is observed that the wallpaper would keep changing and which seems not a good UX.

I would suggest to add a `onBeforeHide` function in which we write the current selected wallpaper to DB. And then we should also call to this function in `panels/themes/panels.js`.