What your friendships and 401(k) have in common — and how to get the best return on investment