indexer: list_metric(), skip sql if names is empty
indexer: list_metric(), skip sql if names is empty

If list_metrics is called with an empty list this creates a
sql request can will not match anything. Sqlachemey is complaining
about this when we batch measure for resource without metrics.

SAWarning: The IN-predicate on "metric.name" was invoked with an empty
sequence. This results in a contradiction, which nonetheless can be
expensive to evaluate.  Consider alternative strategies for improved
performance. 'strategies for improved performance.' % expr)

This change fixes that.

Change-Id: I9287c8d8ef1a5787f9245d78c197d870f959b0c6

leandroreox/gnocchi,leandroreox/gnocchi,gnocchixyz/gnocchi,sileht/gnocchi,sileht/gnocchi,gnocchixyz/gnocchi