Multiconfiguration Dirac-Fock studies of two-electron ions. I. Electron-electron interaction