Refactor tests for kernels REST API
Add tests for interrupting & restarting kernel

These are in an existing test method, as starting and stopping kernels
for individual tests is expensive.
Use assertEqual, not deprecated assertEquals
Merge pull request #4366 from takluyver/multidir-tests-4

Multidir tests - kernel API edition