connection to cube clean up

So... Please give it a try.

What we doing is the following: We creating a pending promise which gets fulfilled when the connection is established and gets rejected if the connection times out or throws an error.

We then use this promise in the devices to do the things, so we don't have to wait for the connection event anymore. We just say: hi just do it if the connection promise was resolved or return the rejected connection promise.