Check CXX before CC in order to have the compiler validation checks in

_AC_COMPILER_EXEEXT apply to CXX instead of CC.  This will address the
concerns expressed in
https://github.com/adaptivecomputing/torque/pull/112

Also fixed --disable-gcc-warnings which didn't work at all.