Theory of electron spin decoherence by interacting nuclear spins in a quantum dot