Quantum theory of spectral diffusion induced electron spin decoherence