RFR: Making the interface of DiscoveryIO generic

Discovered an issue in the DiscoveryIO interface, that it used Metric instead of IMetric. So ingestion for pre-aggregated metrics was exceptioning out since it could not cast Pre-aggregated metrics to Metric.

Solution:
1. Make the interface of DiscoveryIO as generic as possible. Using <Object> here
2. Invoke Unit processing and other metric specific stuff, in the specific implementations
3. For querying - attach unit to the result, only if it's not null
4. Using IMetric wherever possible. 

Review:
1. Enough test coverage
2. Coding conventions
3. Any case that I might have missed, where getUnit() or type may be invoked on IMetric.
4. Review any test cases that I may have missed. 

Test Cases I've checked:
1. Ingestion and queries of pre-aggregated metrics
2. Ingestion and queries of regular metrics (with and without units).
@gdusbabek It may swallow the ClassCastExceptions, that we may want to know about. What do you think?