Re #5939. Add a mechanism to avoid blocking MantidPlot while running.

We replace the IPython method that actually executes the entered code
with one that then calls the original one on a separate thread so that
we can continue to process GUI events while the command runs.