Fix for panning ends active connector

This fix is for panning ends active connector.

If the workspace has an active connection (i.e the state is in connecting mode), then the connector will not be removed even if the mouse is dragged outside the canvas. At the same time, if selection box is moved outside the canvas, then the selection will be removed. 

- [ ] @Benglin 
- [ ] @riteshchandawar