build: simplify and improve the compiler warnings for tests.
* configure.ac (warn_common, warn_c, warn_cxx): New.
Use them to compute independently the options supported
by the C and C++ compilers.
Don't AC_SUBST the variables passed to gl_WARN_ADD: it
does it for us.
(WARN_CFLAGS_TEST, WARN_CXXFLAGS_TEST): Don't aggregate
$WARN_CFLAGS and $WARN_CXXFLAGS in them now, leave it
to atlocal.in.
(O0CFLAGS, O0CXXFLAGS): Move their definition to...
* tests/atlocal.in: here.
Be more systematic between C and C++.
Reorder to factor between variables.
Propagate all of the variables when --compile-c-with-cxx.