Homestyx hydra

R1:16648c28bcd7

Add GROUP BY to commit query

Summary:
Ref T4715. Some minor stuff I caught locally while poking around:

- Since we don't `GROUP BY`, we can still get duplicate commits. These get silently de-duplicated by `loadAllFromArray()` because that returns an array keyed by `id`, but we fetch too much data and this can cause us to execute too many queries to fill pages. Instead, `GROUP BY` if we joined the audit table.
- After adding `GROUP BY`, getting the audit IDs out of the query is no longer reliable.
Repository: R1 hydra
Commit Date: Jul 10 2014