fix 5986

fix #5986

- fix bug revealed by unit tests: made EditorManager.showCustomViewer async to honor the async file.exists() test. fixing tests  by making sure image is fully displayed before evaluating expectations
- remove code that was forcing project tree refresh, this was causing doOpen to be run multiple times thus sending too many documentChange and editorChange events- reverting the fix for #5737
- fix test case. previous test case was still tearing down while new test case was running, hence