Decoherence of a matter-wave interferometer due to dipole-dipole interactions