Shut down kernels in parallel

When stopping the notebook server, it currently sends a shutdown request
to each kernel and then waits for the process to finish. This can be slow if
you have several kernels running. This makes it issues all the shutdown
requests before waiting on the processes, so shutdown happens in
parallel.

KernelManager (and MultiKernelManager) gain three new public API methods
to allow this:

* request_shutdown (promoted from a private method)
* wait_shutdown (refactored out of shutdown_kernel)
* cleanup (refactored out of shutdown_kernel)
Simplify KernelManager.cleanup()
Expose keyword arguments of KernelManager methods on MultiKernelManager
Rename wait_shutdown to finish_shutdown
When a preset is activated fire "preset_activated" event.
On "preset_activated" event, update the value of the maintoolbar select element that lists celltoolbar presets.
When a preset is registered after notebook is loaded, active it if needed.
Make sure that celltoolbars are hidden
when a notebook without "celltoolbar" entry in metadata is loaded.
update CodeMirror to 3.24

to be backported to 2.1
fix typo in v2 convert

resulted in NameError on orig_version because arg name is from_version
Add failing test for issue 2412

Writing history to a file including output fails
Fix writing history with output to a file in Python 2

Closes gh-2412
fix typo in nbconvert help

Latex template is 'base', not 'basic'
cf. https://github.com/ipython/ipython/tree/master/IPython/nbconvert/templates/latex
remove Firefox-specific CSS workaround

The bug being worked around appears to be fixed either in CodeMirror or Firefox (tested with FF 29).

Importantly, the workaround appears to *introduce* incorrect behavior

closes #5192
closes #5364
Pass Windows interrupt event to kernels as an environment variable

This allows third party kernels to use our interrupt mechanism on
Windows.

Closes gh-5840
Fix typos in Cython example
Update Cython Magics.ipynb

Restore name and signature.
fix extra typo spotted by @takluyver
Merge pull request #5846 from koldunovn/master

Fix typos in Cython example
Merge pull request #5842 from pierre-haessig/patch-1

fix typo in nbconvert help
Merge pull request #5841 from takluyver/i2412

Fix writing history with output to a file in Python 2
Remove obsolete Windows workarounds, per @minrk's testing