MainActivity: Do the register/unregister of the push notifications in onPause()/onResume(). Fixes a crash, but we can't get chat notifications unless the app is running, and we can't have global chat notifications until we have a real BroadcastReceiver.