pothos-gui: fix connect/future race + some refactor
pothos-gui: try/catch around main app