Android: Fix flashing on startup/shutdown

There were several issues on startup of the application which
were caused by the fact that we would get the wrong
available screen geometry on startup, set this as the
initial surface size and then expose native windows with this
size. This would cause first a flicker of white on the early
expose and the window contents to jump around as the window was
resized to the actual available space on screen.

The fix for this is to postpone the first expose until we have
actually got a proper screen size from the main layout. We use
width,height = 0 as an indicator that the available geometry
is not yet known, and we skip posting any expose events before
this is set by the layout.

In addition, since we removed the surface before we shut down
the application, it was by a white rectangle before the
shutdown transition happens, and this white rectangle will
be animated instead of application contents.

To rectify this, we make sure the last surface in the stack
remains in the layout until it is either replaced by a different
surface or until the application has shut down. This way, the
shutdown animation will work on this surface instead.

[ChangeLog][Android] Fixed regression where there would be flickering
on startup and shutdown of the application.

Task-number: QTBUG-38960
Change-Id: Ia1579ca8c522d8beeab066f78070ad49009d0238
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Android: Support offscreen surfaces on pbuffers

This is pretty much the same thing that eglfs does.

Task-number: QTBUG-38960
Change-Id: Ibf310ca8e3a4e31e5310ab3a3d3e851eae31a4ad
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Android: Repaint affected areas when window moves

There are no automatic updates of the window when it moves, since
this is not required on most platforms. This broke drag and drop on
Android, because drag and drop creates a temporary window containing
a pixmap with a snapshot of its content. We need to make sure the old
and new location of the window is repainted when it has moved.

[ChangeLog][Android] Fixed repaint issues in drag and drop.

Task-number: QTBUG-35975
Change-Id: I7b043d728551d9963fb5acec804fb90aec5b50ff
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Do not clear default button in QMessageBox::setDetailedText().

Store the value of QMessageBoxPrivate::autoAddOkButton
temporarily when automatically adding the "Show Details..."
button.

Task-number: QTBUG-39334
Change-Id: I173c83893548ee83b3d8ea2743f87686c32657e7
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>