startop: Refactor app running.

Collecting and app running share lots of common code.
Create a new class to run app and allow callbacks to specify
preprocess and postprocess and metrics selection.

Test: pytest run_app_with_prefetch_test.py
Test: pytest app_runner_test.py
Bug: 138233615
Change-Id: I972c82fb9ff3a0f6cc7661bc3dc47b342716c26c
5 files changed