Fix failing rollups

This is the same thing that was happening in the MinValue class:

Rollups are occasionally failing in prod because sometimes the var `o`
is an `Integer`, and we try to cast it to be a `Long`. Which fails
of course with a `ClassCastException` exception.

Same fix as in MinValue class: use `val` instead of `o`.
Add search to DiscoveryIO

* use ElasticIO.Result as SearchResult. It is generic enough.
* simple method in interface to return SearchResults.
* retool tests.
Build the query properly.
Merge pull request #342 from gdusbabek/esio_search

Search specification of for discovery interface.
Initial commit which adds HttpMetricsIndexHandler
Add the HttpMetricsIndexHandler
Use the correct class name in logger for metrics index handler
Merge pull request #343 from chinmay-gupte/chinmay/add_BF_API_support_for_metrics_discovery

WIP: Add query support for metrics discovery
Change the ingestion and query uri structures
Bump the version to v2.0
Merge pull request #335 from chinmay-gupte/chinmay/change_http_uri_structure

Change the HTTP ingestion and query URI formats
Merge pull request #341 from dlobue/failed_rollup_fix_pt2

Fix failing rollups
Route indexing by tenant.

* Use a single index (we were splitting them by shard).
* Call it "metric_metadata"
Merge pull request #344 from gdusbabek/use_elastic_search_routing_on_tenant

Route indexing by tenant
use routing in the query too
fix line break.
remove whitespace goober.
Merge pull request #345 from gdusbabek/use_routing_in_query

use routing in the query too
Update ES metric document mapping

Update ES metric document mapping to match the layout we discussed
during metrics week:
- Use 'human' names - no all-upper case names.
- Ditch type - it is going away, and is only a single letter.
Merge pull request #347 from dlobue/update_es_mapping

Update ES metric document mapping