Catch and log exceptions in session lifecycle listeners (#12915)

Change-Id: Ie8638f010d74c569c5ff56e91c95e23a5cb92c9b