Updated metrics model to contain branch segments. Added initial Metrics API with coverage calculator and event listener specification.