Fixed drag and drop from external files, added tests

- Fixed detection whether the drop zone is inside the currently visible
  table
- Now dragging outside the table does nothing instead of uploading,
  because the user might drop on the sidebar
- Added unit tests for the drop handler

It took me some time to figure out how to simulate the drop event but it was worth it, now it's possible to test those drop event handlers :smile: 

Fixes #8660 

Please review @DeepDiver1975 @schiesbn @icewind1991 @MorrisJobke