Fixed problem with es-cluster-metrics.rb for elasticsearch API version > 1.0.0

With new version of elasticsearch the API has changed. This commit adopts the code to serve the old api requests as well the new version.  It has been modeled after check-es-heap.rb solution for the same problem.
Please use two spaces and indent here.