WIP: Making the interface of DiscoveryIO generic

Also, using IMetric instead of Metric wherever possible. 

1. Review to see if getUnit and getDataType are not invoked when the chances are that the metric is not IMetric
2. Any tests can be added (ElasticIOTest possibly).
3. Any changes to search() in ElasticIO (right now unit will just be null for pre-agg metrics)

Just review 59f64dd