automake: fixup am_common_flags to avoid re-definitions

Splits up AM_COMMON_FLAGS into CPP and C[XX] flags to avoid re-defintion of macros on the command line.