all the main loop is now a goroutine
all the main loop is now a goroutine

fixes the tray icon crash on macosx


Former-commit-id: 7abd16c2910d15675d4e74e473ef0293e68dfcc9 [formerly 3edf1aa375cdc2523e875107ca2c3a3708c3799a]
Former-commit-id: a656111de66bfc772c39c826f6192267f3cddf5d
arduino/arduino-create-agent,arduino/arduino-create-agent,arduino/arduino-create-agent,arduino/arduino-create-agent