build: Use CC_CHECK_FLAGS_APPEND m4 macro to make sure GCC supports flags

This is after finding out that some platforms or versions of GCC don't support
flags like -Wmaybe-uninitialized

The attributes.m4 is stolen from systemd who stole it from xine-lib.

The CFLAGS used for Vala based sources and C only sources are printed in the
summary in configure now too. While it may look like we use more flags for
Vala based sources, we don't it's just -Wall with some flags omitted.