widgets: use pthreads instead of the GThread wrapper

I have no idea why GThread exists, but it hides a lot of functionality,
like the ability to ask child threads to cleanup through e.g.
pthread_cleanup_push(). I haven't found a way to communicate with
child threads with glib, and pthreads honestly feels like a much
cleaner solution.