audio: Rework audio utils and test
This adds harmonics measurement and an upper bound for overall gain,
hopefully causing warnings on systems with extremely high input gain
(i.e. some Thinkpads).
Note that THD measurement did not help with detecting the high gain. It
is just a high gain, it isn't bad in the sense that it does not seem to
distort a lot.