Restructure SVG dragging code

This is a significant rewriting of the code for the object dragging.
I think it isn't finished and we should go more in the direction of
encapsulating stuff in functions and objects, but it's a start.

Unfortunately it doesn't help at all with the dragging problems when
'colliding' with other objects.

Additionally this commit improves the signal-slot structure.

I created a pull request because I didn't want to push right away, but it is intended to be merged (fast-forward) directly to the `svg-edit` branch