giscanner: Respect __GI_SCANNER__ when scanning for macros

When scanning for macros respect ifdefs of __GI_SCANNER__
in the various header files. Only #ifdef and #ifndef are supported.
If __GI_SCANNER__ appears in plain #if statements, a warning is
printed.

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