The p-daugavet property for function spaces