Added LiSession hooks for applicationDidEnterBackground, applicationWillEnterForeground, and applicationWillTerminate events in AppDelegate