Using codemirror mode/meta for mode detection

Many modes aren't being highlighted with `CodeMirror.runMode` that are supported because they don't follow the `mode\mode` pattern: `json` is `javascript`, `bash` is `shell`, etc. Luckily, as of 4.7, the metadata contained in the [meta addon](http://codemirror.net/doc/manual.html#addon_meta) can do a pretty good job based on different strategies, while `master` is even better.

This PR uses `CodeMirror`'s `.modes.hasOwnProperty`, `.findModeByName`, `.findModeByExtension`, and `.findModeByMIME` successively to try to find a matching mode. `.findModeByName` is monkeypatched in from `master`.

`requireCodeMirrorMode` now also returns the "special," MIME-less mode name (like `ipythongfm`) or the "canonical" mode name (a MIME type), which `getMode` can use to return the best possible mode: previously, the argument to the callback were more inconsistent: sometimes the mode function, sometimes whatever comes out of `require` (usually nothing).

Tests added, but really just testing the resolution for common modes... but a lot of things will have had to have worked for that to work, I suppose.

Potential shortcomings:
- the `find*` methods might be expensive... memoize?
- still sometimes immediately calling require... promise might be better?
I'm sure that was the original intent… but nothing was ever using the
callback argument. After using the output in cell and notebook, i tried
returning modes[mode], but then nothing worked. Of all the things getMode
can resolve, a mode function/object as stored in modes is apparently not
one of them. As changed, this always returns a string that getMode can
resolve... presumably it is doing modes[mode] internally.