Allow multiple output formats for runtime metrics

* Add base abstract class MetricsFormatter
* Extract current formatting into TextFormatter
* Add XmlFormatter for XML output format
* Add command line flag for xml format

Test: test.py (gTests)
Test: atest art_standalone_libartbase_tests
Test: art/build/apex/runtests.sh
Bug: 175048705

Size of APEX files:
* before the changes:
  * com.android.art.apex: 61,001,728 bytes (59 MB)
  * com.android.art.capex: 22,757,376 bytes (22 MB)

* after the changes:
  * com.android.art.apex: 60,928,000 bytes (-73,728 bytes)
  * com.android.art.capex: 22,728,704 bytes (-28,672 bytes)

Change-Id: Ie80abaf67ffc721d7da59b8115f655630b21cae4
9 files changed