Bugfixes for 5 0 4 (rebased onto dev_5_0)


This is the same as gh-2970 but rebased onto dev_5_0.

----

Several minor bugs that need to be back-ported into 5.0.4.

To test:
 - Rename a Project or Dataset. On save, check that name is updated in the tree.
 - Search for images that are NOT in your current group. In the search results:
     - Create and download OME-TIFF. Check that script completes with no errors and downloads OK.
     - Run Thumbnails Figure or Split-View Figure scripts (top toolbar of right panel)
 - Select multiple images and try to 'Download' their original files. In the download dialog, add a comma into the zip name field before downloading. Check that downloads OK (with the comma replaced in the resulting zip name).