Fix many issues with drag and drop upload

Fixes upload.php to return the correct folder to the UI on upload.
Fixes logic to append/update the entry when visible and ignore it when not visible, for both file and folder uploads.

Fixes #8669 Drag external file, drop on breadcrumb when file exists
Fixes #8990 Drag and Drop of a file onto a folder in the file list creates "undefined" subfolder

Please review @nickvergessen @MorrisJobke @DeepDiver1975 @icewind1991 @schiesbn