mysql_aggregate_: allow graphing only max/min value

In some cases it can be useful to know the maximum value of any row of an
aggregate (for example, the maximum number of logins by a single user), without
graphing each row separately (because there are too many or the rows change).
This change allows that by setting the "only" parameter to "max" or "min".