Statistics widget: improve performance by avoiding a join

If one doesn't query for the user names for each count directly, but uses only
the user IDs, one can save quite a bit on larger tables. Querying for the user
name directly implies a JOIN. Since we have the ID to name mapping available
anyway, there is no need to query for the names directly.