Mean field social optimization: feedback person-by-person optimality and the master equation