Cleanup and optimize code a bit by calling senderSignalIndex less.
Profiling shows that sender() and senderSignalIndex(), which again calls
sender() internally, are the hotspots in benchPropertyUpdates.
To speed things up a bit, call senderSignalIndex only once whenever a
signal is emitted. The performance gain is about 27% (16ms vs. 22ms).
While at it, also re-use the global s_destroyedSignalIndex static and
also call sender() only once even when assertions are enabled.
Change-Id: I90cd1a2b453e5c40d0f41276968f4545b42076bc
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>