Move CXX_FLAGS_CHECK out of egg_acinclude and remove egg references
Restore a debug build mode pre-autotools by using configure --debug

This also avoids passing various flags to the test builds as before.
It also restors some lost CXXFLAGS.