Add purging of client result cache to parallel.Client

The new methods clear the cached values and free some memory.

The whole thing is split into different methods to both clear the
client and the hub side.

Additionally fix some bugs in other parts of the code.
Add Testcases for new purging methods in parallel.Client

Signed-off-by: Jan Schulz <jasc@gmx.net>
Optimise a check for empty jobs/target lists

If the inputs are empty, no msg_ids should be returned. So change the
test to not only check for None but also for empty lists.

Signed-off-by: Jan Schulz <jasc@gmx.net>
Add shell_futures parameter to run_cell to allow running code without sharing __future__ imports.
Allow caller of MultiKernelManager.start_kernel to pass kernel_id.
General cleanup of kernelmanger.MultiKernelManager.
Removing return value of restart_kernel.

The kernel_id is *always* the same under a restart and there
is no need to return it. The restart handler does pass
the original kernel_id back to the browser as it currently uses it.
Creating application.config attribute.

This creates less coupling between the handlers and the outer
IPython application.
Refactoring kernel_died method to make subclass friendly.
Adding tested ipc support to MultiKernelManager.
Fixing bug in connection file cleanup.

ipc files were not always being removed.
Adding calls to shell_channel.stop() to shutdown.

But this hangs the test suite for IPython.frontend.html.notebook.
Fixing bug in cleanup of ipc files and adding new to shutdown.

* ipc files were not being cleanup on a restart.
* shutdown has a now argument that will call kill directly.
Cleanup naming and organization of channels.

* Change remaining use of "sub" to "iopub".
* Use consistent naming of channel classes across zmq, inprocess
  and qt.
* Move BlockingChannelMixin to zmq.blockingkernelmanager.
Creating an ABC for kernel managers and channels.
Make InProcessKernelManager a Configurable.
Fixing missing metaclass in KernelManagerABC.
Cleaning up MultiKernelManager test and adding linger=0 to shell.

We are finding that the tests for MultiKernelManager hang because
linger default to oo in the shell channel. By setting it to 0,
the tests pass fine. Last night, we thought it was particular to
the ipc transport, but now the hang occurs for any transport.
Renaming test_kernelsession to test_kernelmanager.
Adding test for basic kernel manager.