Clean up notebook Javascript

There were a number of spots where the CodeCell logic depended on the IPython.notebook object.  These have been removed.  I have also cleaned up some of the css that was having problems when CodeCells are embedded onto bootstrap containing pages.  This will help us as we refactor the notebook to use bootstrap.  Finally I have further decoupled the Kernel object from everything else and improved its reconnection logic.