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