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 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`
Updated by ALF automation.
fix the line endings
Add documentation of the fact that the _openDocument promise, as implemented currently, does not reject.
Merge pull request #3142 from iwehrman/iwehrman/live-development-startup-refactoring

[Review only] Harden Live Development startup
Merge pull request #3161 from adobe/alf

ALF Automation