WIP: Making the interface of DiscoveryIO generic

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