Relativistic correlation effects on the hyperfine structure and electric dipole transitions in Cs and Tl