Merge: Gamnit: rewrite Android lifecycle support
authorJean Privat <jean@pryen.org>
Fri, 19 Jan 2018 18:09:07 +0000 (13:09 -0500)
committerJean Privat <jean@pryen.org>
Fri, 19 Jan 2018 18:09:07 +0000 (13:09 -0500)
Rewrite much of the Android support to better deal with system state changes. This includes handling out of order lifecycle messages, temporarily invalid OpenGL display surfaces, and recreating the OpenGL context when it is released by the system.

In practice, this PR recreates in `gamnit::gamnit_android` a better version than what is in `android::game`. The old `android::game` could probably be removed with `mnit` and a small clean up.

As a bonus:
* Into portable* services to lock the device orientation. (The iOS variant will be in another PR when #2605 is merged.)
* Ask for 4x antialiasing, it should be available on all target platforms.
* Compile Android apps using gcc, it appears to compile a more stable GC. We can probably tweak a few defines to use clang instead.
* Fix numeric version numbers using the local time, causing surprises when compiled in the cloud.

Pull-Request: #2607


Trivial merge