Move drag code from SC.PalettePane to a mixin.

Allows adding it to any pane.
Also improved the drag code a bit.