Performance tweaking for AGC.

Apparently enabling AGC produces samples with quite different characteristics,
and ends up eating a lot more CPU as the previous heuristics would generate a
lot of false positives. Tweaking the parameters and a bit of optimization
seems to bring this back down to usable levels without losing many potential
messages.
Measure CPU used by the sample processing thread.
Move CPU instrumentation up into the main loop.