Active Galactic Nucleus X-Ray Variability in the XMM-COSMOS Survey