Try_Jobdir: fix a race condition

Wait for the sourcestamp to be written in the database before adding a buildset
that refers to it.