This removes the -DNDEBUG flag from the CFLAGS and CXXFLAGS even when
this flag is set as part of a selected build type.
For instance the RelWithDebInfo build type CXXFLAGS default to `-g -O2
-DNDEBUG`. This diffs removes the NDEBUG leading to -g -O2 being set
It completes the remove_compiler_flag macro to achieve this, and fixes
some edge cases where the macro would have fail:
- if the flag to remove is located at the end (no trailing space)
- if any of the *_FLAGS variable is empty or unset