Be defensive in dex2oat when updating the vdex in-place.

Invalidate the vdex header before doing any writing, in case
dex2oat gets killed in the middle.

bug: 38113240
Test: test.py --speed-profile
Test: test.py 629-vdex

Change-Id: I4c04ba36db5f6a7066bb6695885e6ae5082d34fb
3 files changed