The rotational spectra of weakly bound dimers of carbon monoxide and the hydrogen halides HX (X=F, Cl, and Br)