[BZ 1015706,1092756] check for invalid max and update it with the avg

We also log a warning to indicate that we have come across an invalid metric.
We then update and persist the max.

Conflicts:
	modules/enterprise/server/server-metrics/src/main/java/org/rhq/server/metrics/MetricsServer.java