Relationship between the structure and the optical and electrical properties of reactively sputtered carbon nitride films