More preferences ID cleanups
Modify _openDocument to return a promise that resolves or rejects only after all the related documents have resolved or rejected. Callers are modified to wait for the promise to resolve before proceeding. This fixes a bug in which _closeDocument could be called before _openDocument had finished.
Modify Inspector.connected() so that it returns true only if the reference to the socket is defined and if the socket is open.
Rename getAvailableSockets to getDebuggableWindows, which is what the function actually does.
Modify connectToURL so that the promise it returns is not resolved until the socket it creates is completely open.
Ensure that agents are loaded before attempting to load the main live development URL. This accomplished by always loading the interstitial page first and then polling to find out whether the interstitial page has finished loading. The agents are loaded next; and then, finally, once agent loading is complete, the main URL is loaded. Should fix #2858.
Modify close() to ensure that the socket isn't closed until after closing the window.
Address Randy's and NJ's review comments.
Merge remote-tracking branch 'upstream/master' into tom/prefs-id-cleanup-2
Improved getClientID and getPreferenceStorage
Fixes after review
Don't return false when getting close window command from native shell. Otherwise, users will lose changes in the unsaved documents.
Using getExtensionPaths and updated handleClientIdChange
Merge branch 'master' into iwehrman/live-development-startup-refactoring

Conflicts:
	src/LiveDevelopment/LiveDevelopment.js
Address issues found by @gruehle and @WebsiteDeveloper. In particular: 1) use jQuery `done` instead of `when`; and 2) don't treat a failure to load a related stylesheet file as a catastrophic failure in `_openDocument`.
Initialize the domains exposed by Inspector synchronously.
Add a unit test for `Inspector.connectToURL` and `Inspector.disconnect`
Removing PreferencesManager-test.js as a headless test
Updated by ALF automation.
Add documentation of the fact that the _openDocument promise, as implemented currently, does not reject.