correct grouping on performance_schema_history (fixes #96)

+ the filtering to auto detect which columns on which to aggregate
  wasn't handling some fields correctly
+ added exception to keep group by from being ambiguous