Add localization helper functions for XUL applications.

That is for the various browsers and Tor Launcher. This will make it
possible to drop the browser localization code from Tails Greeter's
PostLogin script, where that really doesn't belong.

Also, this new code is an improvement in that it will pick a "similar"
locale if the specific one we look for isn't available. E.g. with
pt-BR we will get pt, and the Firefox is smart enough to use the pt-PT
langpack.
Use the new, improved localization code for the browsers and Tor Launcher.
Simplify the chroot browser's code slightly.
Merge branch 'bugfix/8122-better-browser-localization' into bugfix/8036-workaround-for-localized-searchplugins

Conflicts:
	config/chroot_local-includes/usr/local/bin/tor-browser
Use local variables in shell functions.
Get browser locale set by the new browser localization code.
Simplify.
Fallback to "similar" locale's searchplugins.

E.g. if our locale is pt, which doesn't have localized search plugins,
we'll use one of pt-PT and pt-BR.