Ensemble spectral variability study of Active Galactic Nuclei from the XMM-Newton serendipitous source catalogue