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.
Emit also selected name of selected element to Object Editor