optimize and simplify my projects page query

rather than pull up every single project in the database, sorted by last_mod time
via a fairly complex and PG specific query, then merging that in with the list of projects
that the user is actually on, we just pull up the list of projects that the user is on
and then seperately calculate the last_mod time for that project.

The former approach could be faster if a user is on a lot of projects since it gets all
the last_mod times in one go. However, aside from a couple users, the vast majority
of staff are only on a small subset of the total projects, so a lot of that up front work
is wasted. Even for me (and I'm probably on a lot more projects than most staff),
this change took page load from 5 seconds down to 2 seconds. In the process, it also
eliminated a PG specific query, so the view could be properly tested against SQLite again.

This still involves N+1 queries, which is never great. The long term solution for making this
page fast will probably be to denormalize and actually put a last_mod column on the
projects table, with a hook to update it whenever an item in the project is touched. That
will be straightforward to do once the perl code is eliminated.