Init duration metric if condition existed

Initialize a duration metric with the dimensions that are true if the
"what" predicate previously existed.

Assumes that the internal dimensions are a superset of the
dimensions_in_what, the condition links, and the state links

Test: atest statsd_test
Bug: 167491517
Change-Id: I8dd984fb9cb575d6d541f80cb3b1e626ce4e5f27
12 files changed