make close-and-halt work on new tabs in Chrome

this is not possible in Firefox, as new tabs/windows which were *not*
opened via a script ( window.open call ) are not allowed to be closed
via window.close and will yield a message like

--
[11:50:59.691] Scripts may not close windows that were not opened by script. @ http://localhost:8888/static/notebook/js/menubar.js:105
fix: allow JS test to run after shutdown test

shutdown notebook test closes casper browser, here we re-instatiate it
after the test
Use explicit relative imports

python-modernize with lib2to3.fixes.fix_import fixer
Convert print statements to print function calls

libmodernize.fixes.fix_print
Make raise statements Python 3 compatible.

libmodernize.fixes.fix_raise
Fix exec statements for Py 3

lib2to3.fixes.fix_exec
Fix imports of builtins module
Fix long integer literals.

2to3 fixer: numliterals (+ manual changes)
Replace references to unicode and basestring
Update imports for Python 3

2to3 fixer imports (+ manual changes)
Fix references to raw_input()
Fix references to xrange
Update bundled path.py to 4.3
Miscellaneous Py 3 fixes
Fixes for metaclass syntax
Remove uses of iterkeys
Fix references to dict.iteritems and dict.itervalues
Update function attribute names

2to3 fixer: funcattrs
Clean up a couple more references to unicode
Miscellaneous Python 3 fixes