Use '-fsyntax-only' flag for C source files.

Contrary to the message of commit 1bf1cae5ba, all source files are
compiled in a syntax-check request. The modification of global variables
remains hideous.
Scan all project files for headers in one go.

This addresses a very annoying bug where libraries were not found if the
include statements where placed in header files. Now, all files are
scanned before compilation begins.
Scan all files for headers in add_directories().

As in commit f6c5bdd288, all files are now scanned for include
directives. Before, the library developer had to place all directives in
the main header file. This made dependencies between different libraries
harder to spot.