Add willShutdown event public API
Create a public API that allows listening to the willShutdown
lifecycle event triggered by VSCode when it is reloaded or closed. This API is used by the Web IDE to handle errors when starting a remote development session. See gitlab-web-ide#38 (comment 1174964434).