Handle invalid values for getting all metrics.
Handle invalid values for getting all metrics.

The patch resolves 500 server error
when user sends request with invalid values, e.g.
metric?query=KoZlthVNGjXDeWPaEgRPyGjDKvqwHHZJmI
Patch fixes issue 1196.

Change-Id: I2d0f9013af7fcdefa4ba6feddf7ae2e369ec3f21

gnocchixyz/gnocchi,gnocchixyz/gnocchi