Further improves leaderboard performance.

In particular, makes the leaderboard only depend on whether the user is
anonymous, rather than on the user's specific friends and groups.  In
practice this is a small change since most users have at least
PRIVACY_NORMAL for logged-in users.  Also some more random unrelated
performance tweaks.
Merge branch 'master' of github.com:benjaminjkraft/zscore