locale: Don't assume 2-letter language codes.

Some languages have 3-letter codes. So instead of splitting the output
of QLocale::name, use QLocale::language and the static
QLocale::languageToString.
locale: Optimize guessLCLocale by moving function calls out of loops.
locale: Support distributions without locale-gen.

If /etc/locale.gen (or the configured localeGenPath) does not exist,
assume that all the supported languages are already built into the
locale archive, and retrieve the list from "locale -a".

The list will then contain lines with only the locale rather than
locale + space + encoding, but that should not affect any of the rest of
the code. UTF-8 locales will still contain the string "UTF-8" (as part
of the ".UTF-8" suffix), we will not write a locale.gen file if we don't
have locale-gen, and everything else just strips away the encoding.
Automatic merge of Transifex translations
Fix system locale string + allow 3 letter language codes.
locale: Move the string processing out of the loop.
Debug output for lcLocale
Merge pull request #49 from calamares/master

Merge master