Update custom.js for 3.0

I use custom.js in development`3.0.0-dev`. but it not work. my custom.js like this:

```python
IPython.events.on('app_initialized.NotebookApp', function(){                                                                                                   
        function to(mode) {                                                                                                                                    
            var mode = mode || 'vim'                                                                                                                           
            // first let's apply vim mode to all current cells                                                                                                 
            function to_mode(c) { return c.code_mirror.setOption('keyMap', mode);};                                                                            
            IPython.notebook.get_cells().map(to_mode);                                                                                                         
            // apply the mode to future cells created                                                                                                          
            IPython.Cell.options_default.cm_config.keyMap = mode;                                                                                              
        }                                                                                                                                                      
                                                                                                                                                               
        require(["codemirror/keymap/emacs"],                                                                                                                   
                function (emacs) {                                                                                                                             
                    to('emacs');                                                                                                                               
                    console.log('emacs.js loaded');                                                                                                            
                });                                                                                                                                            
})                                                                                                                                                             
                   
```

the broswer said: 

```python
 IPython.events.on is not a function
```
If use `$([IPython.events])` said: 

```python
ReferenceError: $ is not defined
```

I think `main.js` should not depend on the `custom.js`,  this make load custom.js first. but in custom.js, IPython has not been set up. I hope to have a better solution 

```python
$python -c "import IPython; print(IPython.sys_info())"
{'commit_hash': u'7ab0a49',
 'commit_source': 'installation',
 'default_encoding': 'UTF-8',
 'ipython_path': '/Library/Python/2.7/site-packages/IPython',
 'ipython_version': '3.0.0-dev',
 'os_name': 'posix',
 'platform': 'Darwin-13.4.0-x86_64-i386-64bit',
 'sys_executable': '/usr/bin/python',
 'sys_platform': 'darwin',
 'sys_version': '2.7.5 (default, Mar  9 2014, 22:15:05) \n[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]'}
Can we make this consistent with the examples below, i.e. require `base/js/events` and then use `events.on()`.