[metrics] Report some ART metadata

Adds reporting for some metadata associated with ART metrics,
including timestamp relative to ART startup, the session id, and the
process's user id. It additionally outputs placeholders for the
compilation reason and compiler filter, but these need some additional
plumbing from the Runtime and OatFileManager to fill in, so those will
come in a followup CL.

This CL also includes a fair amount of refactoring around metrics
reporting and handling the session data.

Example output:

    *** ART internal metrics ***
      Metadata:
        timestamp_since_start_ms: 768
        session_id: 5026277321588503825
        uid: 123456
        compilation_reason: Unknown
        compiler_filter: (unspecified)
      Metrics:
        ClassVerificationTotalTime: count = 4167
        JitMethodCompileTime: range = 0...1000000, buckets: 7,0,0,0,0,0
    *** Done dumping ART internal metrics ***

Test: ./test/run-test --host --jit 2232-write-metrics-to-log
Change-Id: Ic74b503b135d71099d9e26bf660b60e4cc3a46bc
22 files changed