Properly mock winreg functions for test

Fixes a lot of test failures on Python 3.4 on Windows, caused by
importlib trying to use our mocked out winreg functions when
reload(path) was called.
Merge pull request #6581 from ipython/mock-winreg-tests

Properly mock winreg functions for test
Fix ReferenceError in js tests, fixes #6542
Merge pull request #6584 from jhamrick/fix-js-tests

Fix ReferenceError in js tests
Clean up session class
Fix reference to session in notebook.js
Fix bugs introduced into session.js
Clean up kernel.js
Fix messages received by notification area
User correct check for whether kernel is running in tests
Fix session references in toolbar and menubar
Fix bugs in kernel.js
Fix shutdown test
Better respect for abstraction barriers
Move channels into their own object
Only set channels to null when they are fully closed
Fix kernel and session tests