Re-implement atoms dragging, bind 'mousemove' and 'mouseup' to window

[#57662040] [#57657186] [#57575526]

It should solve a few issues:
- text boxes (and other objects) no longer block atom's dragging,
- dragging out of the iframe is supported better,
- it should be impossible to drag bounded atom outside of canvas
  (bounding box check added).

TODO:
- extract "drag behavior" to some module / more generic form?
- improve performance?