meson: fix CC_VERSION.

The way we use CC_VERSION macro is to give information on the compiler
used during build. This information may be useful when debugging in
particular. So we can't just use `cc.version()` which only gives a
version number, not even the name of the compiler.

Restore the logics of autotools where we were using the result of `cc
-v` (for gcc and clang) and testing various CLI options for other
compilers.

Also this test may fail on meson because of various bugs, which I now
reported and provided patch for (hopefully soon merged). In particular,
when using ccache, the command run fails (also I have to change newlines
in C-style `\n` myself as meson's set_quoted() creates broken header
when newlines are present).

If it fails, let's at least store the compiler name + its version, still
more useful than version only.
5 jobs for master in 38 minutes and 5 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Dependencies
passed #500034
deps-git

00:03:55

passed #500035
deps-x86_64-w64-mingw32

00:13:50

 
  Gimp
passed #500036
gimp-autotools

00:22:25

passed #500037
gimp-meson

00:16:29

passed #500038
gimp-x86_64-w64-mingw32-meson

00:24:12