Move actual process to the thread

After sending my pull request implementing a separate thread I had a vague feeling for days of being missing something. Indeed I was. If we create a separate thread but wait in the main plugin for its processing to end (using 'join') we have actually gained nothing! Plugin was still blocking the UI while doing its thing.

I've fixed that.