Better floating determination mechanism. Fixes #9042 -  Unstable dragging / sorting with jQuery UI 1.9.1 and above

currentItem might be floating which demands horizontal display
hence distance should be calculated based on that. This is useful
especially when the target container is initially empty, which
makes its floating property false even after some floating items
are dragged into it.