How does a power analyzer help in detecting power quality issues like voltage sags, transients, and flicker?