Move runCommand() to the Editor class and make it return a promise
Fix error with anchor toggle state when linking panes
Improve commands and fix minor bugs

 - Allow commands to change the pane context of subsequent commands
 - Change Editor.defineCommand() to accept a config object instead of
   individual parameters
 - Add several safety checks to Editor.defineCommand()
 - Add Editor.hasFocusedPane() to allow checking if any of an editor panes
   are focused
 - Fix minor bugs related to pane focusing
 - Update command definitions to use the new API