Revealing the X-ray variability of AGN with principal component analysis