Carbon concentration dependence of the superconducting transition temperature and structure of MgCxNi3