Relaxed excited state structure and luminescence of thallium-doped caesium chloride and bromide