Fixed situation where application exited while adding a secondary tile without saving persistant data.
Added saving of persistant data to application_deactivated handler also. This should make sure that there is no way the application can be shut down without data being stored.