Improve/fix locale.gen_locale() on Debian and Gentoo.

- Validate the locale first instead of trying to generate it blindly
- Gentoo (just as Debian already did) requires the locale to be listed
  in /etc/locale.gen before being able to generate it
- 'locale-gen' needs the '--generate' param on Gentoo
- Quote the locale supplied to 'locale-gen' as it might contain a
  whitespace
Improve locale._normalize_locale() by dropping the charmap.
Merge pull request #18655 from eliasp/2014.7-modules.locale-gentoo_fixes

2014.7 modules.locale gentoo fixes