Metrics for concrete subtypes of EntityRepository.

- Added a StateMetrics trait.
- Instrumented read/write ops in TaskTracker,
  AppRepository, DeploymentRepository,
  GroupRepository.
- Metrics are available at the /metrics endpoint.