Refactoring Notebook.command_mode

This splits `Notebook.command_mode` into two parts, like `edit_mode` is already. This is needed to avoid having to call `Cell.focus_cell` manually each time `Notebook.command_mode` is called.