The ISO-LWS map of the Serpens cloud core. II. The line spectra