Android: Reorganize the display resize stuff. Assorted cleanup and fixes.