prefs-dialog: Fix crash when locale is saved by older Epiphany
I recently got bored and changed Epiphany from handling lowercase locales (e.g. es-es) to uppercase the country code (e.g. es-ES), since that's how all other browsers work and it's a bit weird for us to be different. I pushed similar changes to WebKit.
But I made a mistake: upgrades from older versions of Epiphany were not handled properly. Values stored in GSettings that used to be valid now cause Epiphany to crash. This commit (a) converts the older values to ensure they are still considered valid, and (b) ensures that we don't crash even if the preference contains gibberish.
Fixes #588 (closed)
CC @calvaris