Update mainloop.c

g_thread_join() consumes the reference to the passed-in thread. This will usually cause the GThread struct and associated resources to be freed so there is no need to invoke g_thread_unref() after g_thread_join()