Cache the app state in static vars. Add mainActivityIsVisible to that.

As of Honeycomb (v11), an Activity is not "killable" until onStop() returns,
so MainActivity.onPause() needn't save state. [This app's minimum version
is HONEYCOMB_MR1 (v12) to get RemoteViews.setDisplayedChild().]