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
Fixes [CRASH] while connecting output to output for the nodes which are not having input slot.

Now preventing invalid connection.
Merge pull request #713 from l2obin/InfiniteCanvas2.0

Fixed various cursor issues and connector issues.