The VIMOS Public Extragalactic Redshift Survey (VIPERS): spectral classification through principal component analysis