Make Accelerator a standalone JS type.

This makes menu and global-shortcut share the same code on accelerator.