Improve nodes/metric detection in RestNodesInfo

Because one URI parameter can contain either nodeIds or a list of metrics,
the check to detect if this parameter is either a nodeId or a metric needs
to be more accurate.