Catch unknown metrics

Return a friendly error when Graphite returns an empty response for an unknown metric.

Refactoring and extended test coverage are included in separate commits.