Fix bug in WaitForCompilationToFinish

We now pass the barrier inside of Finalize, previously we did it in
Run. This was buggy since Finalize is called after Run and there was
a race condition where WaitForCompilationToFinish would delete the
task before we called Finalize.

Change-Id: I3f624fa9cdfcf2b266775c6927c336fb987dd58c
1 file changed