Allow interrupting console Python process

New interrupt button on the console which sends an interrupt
to the Python shell allowing interrupting of long-running python
tasks.

In order to provide a way to interrupt the Python interpreter thread when it is engaged in computation or IO, we move the XML-RPC server into its own thread.  It then sends SIGINT on Unix, CTRL_C_EVENT on Windows, or calls thread.interrupt_main() otherwise.

This allows getting rid of one of the busy wait loops in the console communication - on input()/raw_input(), the XML-RPC server returns immediately and switches the console communication into an appropriate state.

The Interrupt button will also clear any accumulated console input, and send a
new-line to show the user that something has happened - this is useful if a complex expression is entered and the "..." continuation prompt gets stuck; it's easier to hit Interrupt than to work out which close braces/brackets will finish the prompt.