Cleanup and don't deadlock when the tray icon creation failed.