Use a lock in RaceGenerateTask around dex2oat.

To avoid parallel dex2oat invocations, mimic the code from before
that used to lock in OatFileAssistant when invoking dex2oat.

Test: oat_file_assistant_test
Change-Id: I40988f8827539c9288090ebf1e4bc703aeae8e91
1 file changed