Respiratory sinus arrhythmia magnitude quantification as a potential marker of stress and pain in cows and sheep