(ThubanApplication.OnExit): Do some cleanup. (ThubanApplication.MainLoop): Extend to automatically call OnExit.