[pm/metrics] add dexopt latency to the metrics

Only added to the code path where the ArtService is enabled (which will
happen in U). Currently, to test this, enabled ArtService manually by
`adb shell setprop dalvik.vm.useartservice true && adb reboot`.

Test: manual with `statsd_testdrive 524`
BUG: 270585621
Change-Id: I040a6168a9018a83171c44112c5847cc5a0c69c0
3 files changed