Add -Werror=declaration-after-statement to CFLAGS for gcc/clang

Also, use AX_CFLAGS_WARN_ALL (and similarly implement
AX_CFLAGS_WARN_EXTRA) rather than blindly adding these flags
regardless of whether or not they are supported.