Provide GUI main loop integration through cross-thread signals/callbacks

Run the XML-RPC server in its own thread, communicating with the main thread
using GUI-dependent cross-thread signals or callbacks; this allows running a
fully responsive GUI main loop in the main thread.
Support IPython 0.10 and 0.11