SelectFileWidget: Fix drop and drop hover exception in Firefox
SelectFileWidget: Fix drop and drop hover exception in Firefox

dt.types.indexOf doesn't work because dt.types is only Array-like.

Bonus: refactor code and comments for clarity.

Change-Id: Ib20625a7160456b36e77e7a905fc2f5ad3ae39d2

wikimedia/oojs-ui,wikimedia/oojs-ui,wikimedia/oojs-ui,wikimedia/oojs-ui