2014.7 modules.locale gentoo fixes

From the commits:

**efeed3e:**
> Improve locale._normalize_locale() by dropping the charmap.

**ea65712:**
> 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

This PR will only have full effect once #18612 is merged.