Friends view -- take 3

The friends view code has changed and should work both correctly now always (no special exceptions where it might lose friends) and is faster now (no extra work necessary now to prevent the help prevent losing entries).

Again, props to avva for pointing out what I'd screwed up.