Code clean up and implementing cursor management in StateMachine.

Fixes: Mouse cursor issues in Library view, Canvas control including pan mode, connection, window selection.
Prevent snapping from happening for non compatible connection like:
1) Start port to start port
2) End port to end port
3) Self connection of the node

Added mouse cursor for different cases in dragging connector:
1) Non-compatible connection, cursor will change to "arc_select"
   Showing that there are no compatible connection

2) Compatible connection, cursor will change to "arc_adding"
   Showing that the next click will add the connector in place