Preparation of halogenated hydrocarbons by replacement by halogens of halogen atoms by other halogen atoms with simultaneous increase of the number of halogen atoms