[widgets] Updated SwtEnvironment and Application in order not to get invalid thread access and to dispose the tray icon properly