front: Fix cross-threading exception in GameMenuHandler.

Bug introduced in commit:
12269f9d4a502f285db4c7237abd0ba66b0e24d8

This bug occurs only after user manually loads state, then presses
home, then returns to game.  If user doesn't load state, the home se-
quence is fine, which is why I didn't uncover it until now.  When the
user loads state, the audio thread is shutdown and restarted, which
seems to change some aspect of the other threads, so that GameMenu-
Handler's state callback no longer gets called from the right thread.

The solution is to simply call invalidateOptionsMenu() from the call-
back, and then use onPrepareOptionsMenu to do the actual manipulation
of the action bar / menu.  For pre-honeycomb devices, we don't even
need to invalidate the menu, since it will be refreshed next time the
user presses the menu button.  Icing on the cake is that we can move
some member variables to local scope.
xperia-touchpad: Fix hang on destroy.

Now that the lifecycle is fixed, we're finally exercising the shutdown
machinery in the xperia-touchpad library.  It seems the wrong pthread
function was being called.  app_thread_entry needs to raise the
destroyed flag and *wait* for OnDestroy to complete before it can con-
tinue and destroy the mutex and other objects.
xperia-touchpad: Remove a lot of unneeded code.
front: Allow cheats to be used even if resuming.

I don't know all the ramifications of using cheats, then loading an
auto-save... but the main issue I'm concerned with is when the user
started a game with cheats, then presses home, then resumes the game.
Before this commit, the emulator would shutdown, then startup *without*
cheats, then load the auto-save.  After this commit, the emulator will
shutdown, then startup *with* cheats, then load the auto-save.  I'm not
sure if this will cause problems.
xperia-touchpad: Re-implement using android_native_app_glue.

Major simplification of the native xperia-touchpad implementation.

Not just a cosmetic/maintenance fix. This also fixes a thread orphaning
bug.  Before, every time the user quit to the main menu from the game,
one of the threads was not destroyed properly and was left dangling.
So every time the user started and finished the game activity, another
dead thread would be added to the process. We never noticed the problem
before, since System.exit() force-killed these orphaned threads.  But
with the new lifecycle fixes, this bug became evident.

One note: If you build with NDK r9, the xperia touchpad and touchscreen
will spam the logcat with spurious errors.  They're not really errors,
but a new bug in the NDK.  If you build with NDK r8, you won't get the
spam.  See here for details:
http://stackoverflow.com/q/18316046/254218
debug: Log info about pointer events and states

Conflicts:
	AndroidManifest.xml