Fix -Wpedantic warnings or disable it by default
We recently set warninglevel=3 in meson.build. With GCC this leads to
-Wpedantic and a number of new warnings which are, as expected, rather pedantic.
See this build log for a recent list: https://gitlab.gnome.org/GNOME/tracker/-/jobs/1298544
Many are simply trailing
Some are missing casts.
Some are about type redefinition, these hopefully are easy enough to fix by removing the duplicate definitions.