John Waller on how distress and pious fear have led to bizarre outbreaks across the ages