Refactor and fixup the TimerModel for increased stability.

This also fixes the GammaRay unit tests for me.

The biggest issues in the TimerModel where a lack of thread safety
and even in single-threaded apps the code was crashy when _any_
QObject* was deleted from _any_ slot connected to _any_ signal.

In such cases the access to the QObject* from signal_end_callback
resulted reads to invalid memory and thus crashes.

To fix this, we now check the current thread and the object thread
affinity before handling it. I.e. instead of crashing, we simply
don't support QTimer from other threads.

Furthermore we don't blindly access the QObject* caller in
signal_end_callback anymore, but rather remember the callers that
where a QTimer which emitted timeout in preSignalActivate. There
we can safely access the object, as it must be valid to emit
a signal.

I took the liberty to cleanup the code and also optimize the code
by storing the index for the timeout() signal of QTimer once. That
prevents useless string allocations and comparisons whenever a signal
is emitted.