First‐principles study of the electronic structure and the associated magnetism of carbon‐doped TiO2