Rewrite SQL to retrieve recent accounts

The App never displayed the correct recent accounts for me (after 1.4, not sure about before).

In `fetchRecentAccount`, `DISTINCT` does not work very well with `ORDER BY` when the column in `ORDER BY` is not selected.

So I rewrote the SQL to use `GROUP BY` instead of `DISTINCT`. Now I can get the recent account correctly. And the accounts are sorted by time-stamp instead of alphabetically.