heterodyne: Improved ringing detection and bounds.

These were the changes illustrated in Scicom Ticket 204 from October.
The failure to commit then was because it still wasn't quite right,
missing some of the weaker ringing in the wings.  Then JSA work came
to the fore.

I can return to this primitive when applying it to some GBS data where
ringing was present.  It's certainly much better than the previous
incarnation.