configure.ac: remove debug/release concept, prefer autotools default CXXFLAGS

This supercedes #2988 (-O2 -g is now default, plus other flags) and bits of #2986