Add debug config option

This splits the `flags.guess` flags into regular, optimized and debug flags. Then there's the `--enable-debug` option to `./configure` that switches out the optimized flags with the debug flags.

I tried my best to pick out the correct options for optimized and debug flags, but I am not completely familiar with all the compilers, so let me know if one of them doesn't make sense.