Update API to allow collecting execution duration.

Test: NeuralNetworksTest_static
Test: --gtest_filter=IntrospectionControlTest.SimpleAddModel with
      setprop debug.nn.vlog all; by inspection of logcat, verify that
      driver and runtime report the same duration

TODO:
- Ensure duration is reported correctly on error paths and on cpu
  fallback
- Check for more misuses of API:
  - Ensure that we only request measurement before execution starts
  - Ensure that we only request measurement for the special introspection case
  - Ensure that we only request duration after execution completes
- Add more extensive timing tests using the introspection/control APIs

Bug: 115390094

Change-Id: I1dd61e4128963a22955ebab18bcdf7293419ca20
Merged-In: I1dd61e4128963a22955ebab18bcdf7293419ca20
(cherry picked from commit c230aede90719e46f71bc905aceaec2f8fe5455f)
18 files changed