Fixes for cases where settings dialog is re-opened, causing uploads
to stop and restart.  Some of the old user, folder and upload
rows weren't being deleted properly.