core: Fix race condition in upload thread instantiation
core: Fix race condition in upload thread instantiation

The upload thread takes a reference on the GDataUploadStream, but the
stream could be finalised while the thread is still being created;
hence once the thread main function starts and calls g_object_ref(),
the GDataUploadStream has already been destroyed.

Move the g_object_ref() call to before the thread instantiation to
fix this.

pwithnall/libgdata,Distrotech/libgdata,pwithnall/libgdata,Pecisk/libgdata,Distrotech/libgdata,Pecisk/libgdata-gtasks,Pecisk/libgdata,Distrotech/libgdata,Pecisk/libgdata,Pecisk/libgdata-gtasks,GNOME/libgdata,Pecisk/libgdata-gtasks