Use CMake's Debug build mode for debugging

Remove DEBUG option and DEBUG_FLAGS variable and its use. CMake provides
the neccessary flags for debugging via its build/configuration modes.

Move setting of DIAG_FLAGS to if block for the selection of testing,
otherwise relevant flags would not be set.

Remove no longer needed SRC_DIR, LIB_DIR and INC_DIR variables.