Add a workaround to fix compilation with clang 6
clang 6 hangs indefinitely when trying to compile gitter_mgb.cc or gitter_pll_mgb.cc with an optimization level of -O2 or higher. I tried isolating the exact cause of the problem, but didn't have much luck with that, so this patch adds some CMake logic that detects the problematic case and forces the optimization level for those two files down to -O1 if necessary, but avoids bumping it up in case of a debug build.
If possible, it would be good to also backport this patch to the 2.6 release branch.