Preparation of hydrogen chloride from chlorides