CMake: correctly split compiler flags into C and CXX variables
This change requires setting CMAKE_BUILD_TYPE
to "Debug"
in order to be able to correctly set debug and release flags without using if/else statements.
The changes have been tested with a full recompile of ArmarX and afterwards running the ArmarX simulation and moving the robot.