Adaptive Prony Method for Waveform Distortion Detection in Power Systems