Fixing issues with js tests

* Closing old pages to prevent fd leaks.
* Making sure kernels are killed to prevent fd leaks.
* Moving towards deleting old notebooks (this is not done, but
  this should be merged as is).