BUGFIX: fixed some deadlocks on win32 due to threading. Code is now handled on the PyGTK main loop instead. Also resolved problems with cancelling and stopping refinements.