Added tests for multiple calls to unregister lifecycle listeners.