Copy codemirror mode from kernelspec before passing to codemirror

This should fix the IPython mode embedded in notebooks when they're saved - codemirror (or our mode) was changing the object passed into it, which was the same object being stored in the notebook metadata.

Ping @jasongrout