Add preallocated output buffer support to adaptiveThreshold
Implement a thread-safe timer

Qt's timers are not thread-safe (at least on Windows) and cannot be
used the way PiiProbeInput did. The new PiiThreadSafeTimer class
implements the same interface as QTimer, but in a thread-safe way.

Modified PiiProbeInput to make use of the new class.