Fix invalid memcpy(dst, src) calls where dst == src

The convert_generic_inline method was not correctly handling the case
where both the conversion methods were passthrough and the last store
is therefore not needed and may trigger an invalid memcpy call.

Change-Id: Ic88780f50e1ff9dedc04b8ff1ab3527dd0c8150c
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Android: use correct size when leaving fullscreen

On Android, fullscreen means enabling "immersive mode", which
results in the screen available geometry changing. When restoring
normal mode, oldAvailableGeometry == oldGeometry, which means that
the fullscreen branch would be chosen even though the state is not
fullscreen. By doing the maximized test first, we will default to
non-fullscreen geometry for non-fullscreen windows.

Task-number: QTBUG-39977
Change-Id: Ifc7e8b4de7e96d8c00603ce0cd136b95f58012bb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>