configure: rewrote the support for languages in localisation
The code was moved to a dedicated file (wm_i18n.m4) to reduce the size of
configure.ac;
It now searches for gettext+libintl only if LINGUAS is specified, because
there is no need for them otherwise;
The list of supported locales is created automatically from the list of
files present in the source tree, so there won't be problem forgetting to
update the variables when a new language is added, or removed because
one is considered outdated;
The new syntax is now using as much as possible Autoconf's syntax to ensure
consistency and better portability;
Took opportunity to improve the language check loop to make it smaller and
to tell when a locale that the user asked for is not fully supported.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>