Core: getter for window's docks.
Core: method for moving docks in internal API.
Core: move docks to primary window on window close.
Core: fixed moving incorrect tab to a new window.