Optimal Aggregation Strategies for Social Learning over Graphs