fix 5705 - Image closed and no editor opened after if cancel quitting or closing project
Also fixes handleFileClose() with the image file path.
do not resolve FILE_CLOSE command early inn case the working set is not empty. Wait for open command to resolve before resolving close promise.
fix handleFileClose with file correctly - only close custom viewer if the file argument matches the file in the viewer. Always close custom viewer if no file argument is present.
fix jslint
fix case where user quits brackets and an image is open while one or more text files are dirty in the working set. Previously Brackets would quit w/o prompting the user to save. That is now fixed.
fix jslint and remove commented line of code
- don't close custom viewer if user cancels out of quit
- correctly handle 2 paths to closing custom viewers
  a) the command does specify the file
  b) the command does not specify the file
clean up as recommended by @RaymondLim
Merge pull request #5710 from adobe/couzteau/fix-5705

fix 5705 - Cleanup for Peter's belated drive by comments