Replace focusout event handlers on hiddenInput shim with blur handlers

The focusout event doesn’t seem to work for elements in the shadow DOM.
Other people seem to share this experience:

https://code.google.com/p/chromium/issues/detail?id=378163#c7
Only cancel focus events if the editor is or contains the related target
Upgrade package-generator to fix specs with shadow DOM
Assign package stylesheet context based on double-extension in file name

If stylesheet files are named with 2 extensions, the first extension is
used as the context argument when the package’s stylesheets are loaded.
This allows people to target the text editor by naming their stylesheet
`index.atom-text-editor.less`.
Wait for promise resolution on all calls to activatePackage

This avoids a race condition where stylesheets would be added after all
packages were deactivated and leak into the next spec.
Toggle quotes back
Null-guard component in blur handler
:arrow_up: autocomplete for shadow DOM fix with auto-selecting 1 option
Fix specs
Simplify focus/blur handling

Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Only create a shadow root if editor.useShadowDOM config setting is true

Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Correctly handle focus when shadow DOM is disabled

Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
:lipstick:
Make blur event on text editor element work with shadow DOM disabled

When the shadow DOM is enabled, this happens organically because the
focus is abstracted across the shadow boundary. Without that abstraction
boundary, we need to pretend that a blur of the hidden input is actually
a blur of the entire editor.

Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Fix corner cases related to lifecycle state of EditorComponent on events

Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Focus the root TextEditorElement in spec instead of component node

Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Test editor focus/blur handling with shadow DOM enabled/disabled

Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Enable editor.useShadowDOM in all specs
Add config schema for editor.useShadowDOM

Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Handle focus on hidden input when shadow DOM is disabled

Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>