MER: Add libsystrace support.

[MER]: This patch is not upstreamed as libsystrace is not widely in use, the
impact of additional function calls into QtBase was undesired, and the general
approach is not really generic to other types of tracing at this time.

libsystrace is a very small initialized-on-load wrapper for Android systrace
functionality, used so that data is written in order, regardless of how many
different libraries are writing data to it at a given time.

systrace is very useful for tracking system behavior, and for performance
analysis and improvement.

See also:
https://developer.android.com/tools/debugging/systrace.html

Some example uses of QSystraceEvent are also included in this patch. More are
undoubtedly possible. Additional tracing (e.g. counting the number of ongoing
HTTP requests and various other bits and pieces) are also easily accomplished.

Change-Id: I70012f6ddaa084f5b08685ee40795d7fafcd9c96
Expose QPlatformWindow::invalidateSurface as a virtual function.

This can be quite useful on some embedded systems to free up
graphics memory when windows are not used. QEglFSWindow already
implements the function.

Change-Id: I79b08efbd3c67d7be34df6a0e12dd184a92d48c5
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Prevent QUnifiedTimer from ticking backwards.

This could happen in the following situation:
* a custom animation driver with fixed delta
* a triple-buffering scheme (rendering ahead a frame)
* a second animation timer starting while a first was active

This would cause QUnifiedTimer::startTimers() to trigger
QUnifiedTimer::updateAnimationTimers(-1), and use the current time from
the QElapsedTimer rather than the animation driver. This time could be
less than the last reported time from the animation driver.

Change-Id: Ibf1796fcb99f288d4946b30e5e7225695aa61781
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>