Substitutional carbon impurities in thin silicon films: Equilibrium structure and properties