Fix bug caused by nameless, empty paths
Fix update of thing sprites in map editor

- Don't update the sprites only if drawtype is TDT_SPRITE, because it
prevents updates for square + sprite and framed sprites modes.
- Drawing one updated sprite updates the update time, so the next
updated sprites wouldn't be updated.
- Moving things around would draw the wrong thing sprites because the
code confused the selection number with the thing number.
Only create QuickTextureOverlay3d if valid

Externalized the validity check to a static method, which is called
before destroying the existing overlay and creating the QT overlay.
Avoids weird behavior when hitting the keybind while a thing is
selected.
Merge pull request #93 from Gaerzi/master

Sync with my fork.