Wait for ES response in insertDiscovery

This fixes intermittent test failures caused by running tests before all
metric names have finished being indexed.
Merge pull request #134 from dlobue/wait_for_insertDiscovery_response

Wait for ES response in insertDiscovery