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.