remove test that is no longer relevant (package.json can be missing
legally, and the test that follows the deleted one catches validation
issues in general)
created an automated test for installation that verifies
the installation and mocks the extension loading to verify
that the extension *would* load.

disabled the test because it can only run once and will
fail on the second run because there's no way to delete the
target directory
added comments and a string for ALREADY_INSTALLED
Ensure that new state is set before processing the state transition
Added unit tests for cases where installer succeeds/fails synchronously
switch to the .spec.js convention used by brackets-jasmine
handles zip files with directories and removes common prefixes
(from GitHub for example)
pause reading the file so that the directory can be created
forgot to check for the presence of the nested file in the
multi-directory-level extension
Extensions that are not compatible with the brackets API version
are installed disabled.
Initial implementation of downloading extension file from URL. Clicking Ok
in dialog triggers download, but we don't yet do the validation afterward.
No cancelation yet, and errors aren't exposed in UI anywhere.

Includes a few cleanups to improve Node connection error cases.
Support canceling pending downloads. Cleaner API from UI layer to Package
'backend' layer with state tracked more rigorously. Centralize wrap-up
code that runs when a download is over (for whatever reason).
Hook up the full installation workflow to the UI. Caveats:
- if you're fast enough to click cancel when it's doing something other
  than downloading, it won't work right
- there's a race condition where sometimes we try to start install/validate
  before the downloaded file is fully saved to disk
- downloaded ZIP file isn't deleted after installation

Also fixes a few glitches in the validate/install code and a few formatting
issues that fell out of my last rebase.
Emit more structured error messages from extension install process. Fix bug
where canceling download switched to error UI state instead of cancelation
state.
added some fail cases and updated some comments based on review
renamed "extensions" domain to "extensionManager" for clarity of
purpose (per @njx review comment)
more review feedback follup. pausing extractStream rather than
readStream, changing to synchronous exists to avoid possible
race, handling edge case where there might appear to be a commonPrefix
in a zip package but there actually isn't.
guards against callbacks being called more than once
* Fix race condition where we didn't wait for downloaded file to flush to
disk fully before beginning to process it.
* Delete temp downloaded file once it's done being processed.
* Small improvements to error result handlng.
* Use periods consistently in error message strings & group them with other
extension UI strings.
validates package names based on CommonJS spec to ensure that they will be
legit as directory names