vala.m4: honour CC, CPPFLAGS, CFLAGS, LDFLAGS

These variables may be set to values that are required to build
executables.  Make sure we honour them from vala.m4 when attempting to
check for packages.

https://bugzilla.gnome.org/show_bug.cgi?id=724176