ZMQ heartbeat: catch EINTR exceptions and continue.

The zmq heartbeat channel exits when it encounters an
"Interrupted system call", thereby causing the qtconsole to
report that it is not responding, despite the console working
perfectly fine. Observed in a large Qt application embedding
the ipython qtconsole.
Fixes #2310
Merge pull request #4118 from pankajp/heartbeart-channel-handle-EINTR

ZMQ heartbeat channel: catch EINTR exceptions and continue.

closes #2310
move test_kernel from IPython.zmq to IPython.kernel

I don't know how it managed to get left behind.
Merge pull request #4121 from minrk/move-kernel-test

move test_kernel from IPython.zmq to IPython.kernel