Report dex2oat metrics also in exceptional cases

Before this CL, whenever the dexopt process fails with a
RemoteException or a RuntimeException, dex2oat will not
report any metrics to StatsD, leading to potential data loss.

After this CL is applied, also those two cases are handled
correctly and dex2oat will report metrics.

Bug: 327134025
Test: atest ArtServiceTests
Flag: EXEMPT bugfix
Change-Id: Ic67b08751b0126ab9d962e3f64c5a91aa40715a5
3 files changed