Play nice with App Nap

Ships @minrk/appnope in `IPython.external`, which uses ctypes to make the appropriate NSProcessInfo calls.

It does not disable App Nap outright, rather making the appropriate context manager calls to disable it only around the critical block.  The important change is that `QSocketNotifier` is used to trigger event handling in the kernel, rather than a Timer, which should never have been used.

should close #4431