Added new event to give the app an opportunity to clean up before it is deleted, and the new version is applied.
Most useful for cancelling animations and the like