Made heartrate code more robust

I modified Catie's instantaneous heartrate algorithm slightly to make it
more robust to brief glitches in the physio recording. I also added an
alternative instantaneous heartrate algorithm that should be more
accurate and more robust to glitches. This new algorithm is NOT used by
default. But we should switch over at some point.