Kernel and session javascript cleanup

This pull request fixes `kernel.js` and `session.js` to be more respectful of abstraction barriers, and makes it easier to track the kernel state. Some of this is just rearranging functions so they are in a more logical order, more major changes include:

* After the kernel has been started, all interaction should be through it, rather than through the session, with the exception of (1) renaming the notebook and (2) deleting the session
* Remove the `Kernel.running` variable, as its state was not always consistent. Instead, introduce the distinction between "kernel exists" and "kernel connected". For most intents and purposes, to check if the kernel is running you can now call `Kernel.is_connected()`
* Fully support all REST API functions for the kernel and the session.

I have additionally documented most of the event messages regarding the kernel here: https://github.com/ipython/ipython/wiki/Dev:-Javascript-Events

closes #6560
I think that makes sense.