Fix #5275: $1 and so on now work with replacing with RegEx

Fixes #5275
Recent Projects - Pressing delete key removes project from list
Merge remote-tracking branch 'upstream/master' into patch-6
My try to improve the replace() function
Make the project-dropdown-toggle toggle the dropdown menu
Allow event propogation even when there is no dropdown item.
Fix wrong path of Getting Started directory in Polish version
Incremental clean up of paths without trailing "/":
- Rename FileUtils.canonicalizeFolderPath() to stripTrailingSlash() since
it actually makes paths NOT canonical. Old API left in place with
deprecation warning for now.
- Add warning to docs for a few other APIs that return non-canonical paths:
FileUtils.getNativeBracketsDirectoryPath(), FileUtils.getNativeModuleDirectoryPath(),
ProjectManager.getInitialProjectPath(), ProjectManager.updateWelcomeProjectPath()
ProjectManager._getWelcomeProjectPath()
- Indicate explicitly which ProjectManager APIs support receiving
non-canonical paths
- Centralize code that touches welcomeProjects storage pref for clarity

What this does NOT do:
- Fix the other APIs listed above that still return non-canonical paths
- Fix non-canonical first-launch project path given to _loadProject()
- Fix non-canonical paths used in RecentProjects prefs
- Fix non-canonical paths used in welcomeProjects pref
- Fix ScopeManager, which in some places requires canonical paths and
in other places requires non-canonical paths
Fix some APIs to work with canonical paths (ending in "/") instead of non-
canonical:
- ProjectManager.getInitialProjectPath() - always returns canonical
- ProjectManager._getWelcomeProjectPath() - always returns canonical
- ProjectManager.updateWelcomeProjectPath() - arg assumed to be canonical &
always returns canonical

None of these APIs are used in extensions.

This does NOT change the underlying "welcomeProjects" pref - like
"recentProjects", it still stores paths without trailing "/" under the hood
preview images
fix menthod name + jslint
fix DocumentCommandHandlers tests
- add test case to validate the EditorManager APIs getActiveEditor, getCurrentFullEditor and getFocusedEditor return null after opening an image
- add test case to validate the EditorManager APIs getActiveEditor, getCurrentFullEditor and getFocusedEditor return en editor after opening a text file
- resolve promise on opening image
- update test case to expect no current document when image is open
fix bug found during test development: fire currentDocumentChanged when image is replacing a text document
- add unit test for prettyPrintBytes (+13 squashed commits)
- add test case for clearCurrentlyViewedFile
- add test case for getCurrentlyViewedFile and setCurrentlyViewedFile
- add test case for clearCurrentDocument
- add DocumentManager integration tests
- add test cases to verify that currentDocumentChange and activeEditorChange events are fired correctly
- fix minor nits: update jsdoc + format + copyrights + style +  quotes + comments, remove unused vars
- refactored & simplified some code around removing custom viewers per suggestion by @RaymonLim
minor nit + typo
fixes for various nits found by @RaymondLim in code review.
Merge branch 'master' into couzteau/preview-images-review

Conflicts resolved
	test/UnitTestSuite.js