Exchange interactions between orbitally degenerate ions in Ti2X3−9(X=Cl,Br)