Several fixes for release candidate 0.12.0rc0.

Fixed cflags for g-ir-scanner.
Fixed includes in Makefile.am.
Fixed g_clear_pointer macro and its usage.
Added macros to control usage of subprocess in tests.
Fixed tests (using g_test_trap_fork unitl glib < 2.40).

Updated ChangeLog.